Intel 8051 Microcontroller Architecture and Features
Classified in Computers
Written on in English with a size of 3.35 KB
The Intel 8051 is an 8-bit microcontroller, meaning most available operations are limited to 8 bits. There are three basic "sizes" of the 8051: Short, Standard, and Extended. The Short and Standard chips are often available in DIP (Dual In-line Package) form, but the Extended 8051 models often have a different form factor and are not "drop-in compatible."
Key Features of the Intel 8051
- 4 KB on-chip program memory.
- 128 bytes on-chip data memory (RAM).
- 32 bytes devoted to register banks.
- 16 bytes of bit-addressable memory.
- 80 bytes of general-purpose memory.
- Four register banks.
- 128 user-defined software flags.
- 8-bit data bus.
- 16-bit address bus.
- 16-bit timers (usually 2, but may have more or less).
- 3 internal and 2 external interrupts.
- Bit as well as byte-addressable RAM area of 16 bytes.
- Four 8-bit ports (Short models have two 8-bit ports).
- 16-bit program counter and data pointer.
- 1 microsecond instruction cycle with a 12 MHz crystal.
Data and Program Memory
The 8051 microcontroller can be programmed in PL/M, 8051 Assembly, C, and a number of other high-level languages. Some compilers even support compiling C++ for an 8051.
Program memory in the 8051 is read-only, while the data memory is considered read/write accessible. When stored on EEPROM or Flash, the program memory can be rewritten when the microcontroller is in a special programmer circuit or, if not using an 8031, through a pre-installed bootloader.
Program Execution Start Address
The 8051 starts executing program instructions from address 0000h
in the program memory. The A
register is located at the SFR memory location 0xE0
. The A
register works in a similar fashion to the AX
register of x86 processors. The A
register is called the accumulator, and by default, it receives the result of all arithmetic operations.
Special Function Registers (SFR)
The Special Function Register (SFR) is the upper area of addressable memory, from address 0x80
to 0xFF
. Registers like A
, B
, PSW
, and DPTR
are part of the SFR. This area of memory cannot be used for data or program storage but is instead a series of memory-mapped ports and registers. All port input and output can therefore be performed by memory MOV
operations on specified addresses in the SFR. Additionally, different status registers are mapped into the SFR for use in checking the status of the 8051 and changing some operational parameters.
General Purpose Registers
The 8051 has four selectable banks of eight addressable 8-bit registers, R0
to R7
. This means there are essentially 32 available general-purpose registers, although only 8 (one bank) can be directly accessed at a time. To access the other banks, the current bank number in the flag register needs to be changed.