The 8051 architecture provides many functions like CPU(central processing unit), RAM(random access memory), ROM (read-only memory), I/O (Input/Output), timer, interrupt logic. etc.
Intel introduces 8051 microcontrollers in 1981. It is an 8-bit microcontroller. It is built with 40 pins DIP (dual inline package), 4kb of ROM storage (on-chip memory). We can also interface external memory storage and size up to 64 kb (Because the program counter is 16 bit).
8051 microcontroller contains 128 bytes of RAM storage, 2 16-bit timers and four parallel 8-bit ports, which are programmable as well as addressable as per the requirement. It also contains the on-chip timer, UART (Serial Port) and interrupts.
Let summarize the feature of the 8051 Architecture,
- It is built with 40 pins DIP (dual inline package).
- It has 8–bit CPU. The CPU can work on only 8 bits of data at a time.
- Internal ROM of 4K Bytes – It is a flash memory that supports in-system programming. We can also interface external memory up to 64K.
- Internal RAM of 128Bytes.
- It has four register banks, such as Bank0, Bank1, Bank2, Bank3 which are selected by the PSW (Program Status Word) register.
- It has 4 ports and each port contains 8 pins for GPIO operation.
- Two timers (T0 and T1).
- It consists of 1 UART.
- 8 bit SP (stack pointer) and 16 bit (Program Counter).
- It contains interrupts.
You can also read the post, 8051 Microcontroller Pin Diagram, and Pin Description.
Architecture of 8051 Microcontroller
In the below image, you can see how the CPU connects with all on-chip peripheral using the system bus. The system bus consists of an 8-bit data bus, a 16-bit address bus and bus control signals.
CPU (Central Processor Unit):
A CPU (Central Processor Unit) is the brain of the microcontroller. It executes information stored in memory and manages all processes that are carried out in the Microcontroller. In idle mode, the CPU puts itself to sleep while all the on-chip peripherals remain active.
RAM (random access memory):
RAM is a volatile memory, it stores data and information temporarily while the computer is running. The data is lost when the power is off. In 8051 microcontroller 128 Byte, internal RAM is available.
ROM:
It stores data permanently. The 8051 microcontroller has 4K byte of code memory or program memory. It could be EEPROM or flash memory.
System Bus:
The bus is a collection of wires which work as a communication channel or medium for transferring the data. In 8051, the system bus consists of an 8-bit data bus, a 16-bit address bus and bus control signals.
Address Bus:
An address bus is a bus that is used to specify a physical address. When a processor or DMA-enabled device needs to read or write to a memory location, it specifies that memory location on the address bus (the value to be read or written is sent on the data bus).
Data Bus:
Using data bus CPU either gets data from the device or sends data to device. Microcontroller 8051 has 8 bits of the data bus to carry the data.
Control Bus:
It provides read or write signals to the device to indicate that the CPU is asking for information or sending it information.
Input/Output Port
The 8051 microcontroller has 4 port for input and output operation. Except for Port0, all port has inbuilt pull-up register. Each pin of the gpio port is bidirectional and use for input and output operation.
Timers/Counters:
A timer is used to generate the delay and counter is used to count the events happening outside of the microcontroller. 8051 microcontroller has two 16 bit timers and counters. It works in 4 modes.
Interrupts:
An interrupt is an external or internal event that interrupts the microcontroller to inform it that a device needs its service. The 8051 microcontroller has two external interrupts INT0 and INT1.
Recommended Post
- Led blinking program in c for 8051.
- Interfacing of switch and led using the 8051
- Interfacing of Relay with 8051 microcontroller
- Moving message display on LCD using 8051
- LCD 4-bit mode c code for 8051.
- Create LCD custom characters for 16×2 alphanumeric LCD
- Interfacing of keypad with 8051
- Electronic digital lock using the 8051
- Interfacing of EEPROM with 8051 microcontrollers using I2C
- Embedded c interview questions.
- 8051 Microcontroller Pin Diagram and Pin Description.