The 8051 microcontroller family:EXTENDED 8051

EXTENDED 8051

Context

You are developing a microcontroller-based embedded application and have some flexibility in the choice of hardware platform to be used.

Problem

Should you base your application on an Extended 8051-family microcontroller?

Background

As we have seen in connection with ST ANDARD 8051 [page 30] and SMALL 8051 [page 41], this long-lived microcontroller family continues to thrive partly because it offers a huge variety of ‘standard devices’ (covering the territory of traditional 8-bit microcontrollers) and a range of ‘small devices’ (overlapping with the range of 4-bit controllers, and challenging devices such as the small PIC range).

Both the Standard and Small 8051s are aimed, largely, at low-cost, low-performance application areas where limited memory is required and the three most important con- siderations are ‘cost, cost and cost’. Of course, not all projects take this form.

To develop applications requiring specialized hardware or larger amounts of memory, we can opt to switch to a 16-bit (or 32-bit) microcontroller environment. However, such a move can require a major investment in staff, staff training and development tools. An alternative is to use one of the Extended 8051 devices intro- duced in recent years by a range of manufacturers. Such devices preserve the investment in the 8051 range and, at the same time, open up new application areas to this microcontroller family.

In general, the extended 8051s offer the widest range of features available in 8051 devices. For example, the Infineon C505C and C515C include a useful range of on- chip hardware components (including in this case support for the CAN3 bus) that have led to these devices being used in the vast automotive market.

The C505C and C515C both retain the memory limitations of the Standard 8051. By contrast, other Extended 8051s, such as the Dallas 80C390 (Figure 3.6) and the Analog Devices ADµC812 (Figure 3.7) can access much larger amounts of memory, in a linear address space.

Compared to many 16-bit microcontrollers, the Extended 8051s are, usually, com- paratively inexpensive: however, they are inevitably more expensive than either the Standard 8051 or Small 8051 alternatives.

The 8051 microcontroller family-0081

Solution

Should you use an Extended 8051 microcontroller in your application?

Performance issues

The Extended 8051s have good levels of performance. For example, as we have previ- ously noted, the performance of the Dallas 80C390 is up to 10x higher than the original 8051. In addition, the presence of hardware maths units in several Extended 8051s can significantly improve the speed of maths-intensive programs. Nonetheless, the Dallas 89C420 (a Standard 8051) is more powerful than any of the current Extended 8051 devices.

Memory issues

Some of the Extended 8051s support the use of large amounts of external memory. Of particular note here is the Dallas 80C390, the Analog Devices 80µC812 and the Philips 80C51MX. (See Chapter 6 for details.)

Availability of on-chip hardware components

Some of the on-chip hardware components available on Extended 8051s are as follows:

● Several Extended 8051s have on-chip analog-to-digital converters (typically up to eight channels, 10-bit resolution). We discuss the use of such converters in Chapter 32.

● Several Extended 8051s have hardware support for mathematical operations, ensur- ing that (for example) floating-point maths operations are carried out comparatively rapidly. See, for example, the data sheets for the Infineon C517, C537 and C509 and the Dallas 80C390 (included on the CD).

● Some Extended 8051s have support for the Inter-Integrated Circuit (I2C) bus. We discuss this important serial protocol in Chapter 23.

● Some Extended 8051s have on-chip support for the SPI bus. We discuss this impor- tant serial bus protocol in Chapter 24.

● Some Extended 8051s have support for the Controller Area Network (CAN) bus. We discuss the CAN bus in Chapter 28.

● Some Extended 8051s have on-chip digital-to-analog (D-A) converters. We discuss such converters in Chapter 34.

Pin count

Many Extended 8051s have a very large number of available port pins. For example, the C509 has nine 8-bit ports. Even where external memory is used, six complete 8- bit ports are available.

Power consumption

See ST ANDARD 8051 [page 30] for details of the three main operating modes of the 8051 family. Inevitably, given the large number of on-chip hardware components, the basic current requirements of the Extended 8051s is larger than that of the Standard 8051. In addition, if external memory is used, the current requirements are best deter- mined for the prototype circuit.

As a basic guide, typical current requirements for the various modes of some repre- sentative Extended 8051s are shown in Table 3.3.

The 8051 microcontroller family-0082

Hardware resource implications

The Extended 8051s provide a range of different hardware resources depending on the device chosen:

● In all cases, the core is 8051 compatible.

● In most cases, many additional peripheral devices are included on chip. In most cases, high CPU performance is available.

● In some cases large amounts of external memory may be directly accessed.

Reliability and safety implications

There are no available figures to suggest that the Extended 8051 is any more (or less) reliable than any other microcontroller family. However, it should be noted that many Extended 8051s require the use of external memory: this may reduce the over- all system reliability compared to an otherwise identical system constructed using only internal memory, for reasons discussed in ST ANDARD 8051 [page 30].

Portability

Because of the huge range of different 8051 devices available, designs based on the Extended 8051 are inherently portable. However, as already discussed, the various ‘extended’ 8051s share only the common core and are not pin compatible (by any means). This means that core routines (like schedulers, for example) may be easily ported, but other components will need to be adapted to suit a particular device.

Overall strengths and weaknesses

To summarize, the Extended 8051 has the following strengths and weaknesses:It is based on the 8051 architecture and thus has many of the strengths of the Standard 8051.

It has – in most cases – a large number of external port pins available.

It has – in most cases – a number of additional on-chip hardware compo- nents available.

It has – in many cases – an ability to access large amounts of ROM and RAM memory.

Still, essentially, an 8-bit device: for higher levels of performance, a 32-bit device may be a better option.

Related patterns and alternative solutions We consider three alternative solutions in this section.
Use two (or more) Standard 8051s

Suppose we require a microcontroller with the following specification:

● 60+ port pins

● Six timers

● Two USARTS

● 128 kbytes of ROM

● 512 bytes of RAM

● A cost of around $2.00 (US)

We can meet many of these requirements with an EXTENDED 8051 : however, this will typically cost five to ten times the $2.00 price we require. By contrast, the ‘micro- controller’ in Figure 3.8 matches these requirements very closely.

Figure 3.8 shows two standard 8051 microcontrollers linked together by means of a single port pin: as we demonstrate in SCI SCHEDULER ( TICK ) [page 554], linking the two processors can be done with a minimal software and hardware load. The result is a flexible environment with 62 free port pins, five free timers, two USARTs and so on. Note that further microcontrollers may be added without difficulty and the commu- nication over a single wire (plus ground) will ensure that the tasks on all processors are perfectly synchronized.

The 8051 microcontroller family-0083

Build your own 8051 device

If none of the available Extended 8051 devices matches your requirements, it is now possible to create your own. Specifically, Xilinx Foundation4 provides a comprehen- sive set of tools for the programming of field-programmable gate arrays (FPGAs) or application-specific ICs (ASICs). Compatible with these tools are a small range of 8051 ‘cores’ which can be purchased from Dolphin Integration.5 These cores are not cheap (around $16,000), but they are efficient (one oscillation per instruction) and the use of such techniques allows you to add hardware components to your specialized microcontroller, to meet your particular requirements.

The creation and use of such 8051 devices is beyond the scope of the present edi- tion of this book, but the WWW sites for the companies concerned will provide further information. To make use of these techniques, you will need some familiarity with VHDL.6 Yalamanchili (2001) provides a good starting point.

4. VHDL stands for VHSIC Hardware Description Language. The acronym VHSIC, in turn, stands for Very High-Speed Integrated Circuit (programme). These terms originated in a (US) Department of Defense programme which had the goal of developing a new generation of high-speed ICs. The first version of VHDL was released in 1985 and the most recent version is an IEEE standard (1076–1993).

It is worth noting that the availability of the 8051 core in this form is another, very useful consequence of the fact that this microcontroller architecture is very mature.

Use an XA-family device

The final alternative to the Extended 8051 which we will consider here is the so- called ‘8051XA’ family, from Philips.

When developing the 251 family (discussed in ST ANDARD 8051 [page 30]), Intel chose to produce a range of devices that was, to a large extent, both (executable) code and hardware compatible with the original 8051. When developing the XA family, Philips opted to follow a different route. The aim was to develop a new, 16-bit ‘8051’ device which preserved source code compatibility with the 8051, but little else.

The XA family has features including dual 16 Mbyte address spaces (code and data) and fast (hardware) multiply and divide facilities. It also includes dual USARTs, an on- chip ADC and hardware support for the I2C bus.

It should be noted that very similar facilities are provided by recent Extended 8051 devices and that – unlike the Extended 8051 – the XA family requires that the devel- opers purchase different software tools (compilers etc). In addition, the XA family has not proved particularly popular, with the result that tools, and development boards, are not very widely available.

Please refer to the Philips WWW site7 for further details of the XA family.

Example: Using the Extended 8051

We give many examples of the use of Extended 8051 devices throughout this book.

Further reading

A collection of data books for a range of Extended 8051 devices is included on the CD-ROM.

Leave a comment

Your email address will not be published. Required fields are marked *