The Intel 8051 is a very popular general purpose microcontroller widely used for small scale embedded systems.
- 8051 chip need +5V 500mA to function properly.
- The 8051 is an 8-bit microcontroller.
- 4k bytes ROM for the program.
- 128 BYTES of RAM for variables.
- 32 I/O lines ( 4 PORTS WITH 8pins EACH ).
- Two 16 bit timers.
- One Serial port.
- Six interrupt.
- Most of these pins are used to connect to I/O devices.
- Four I/O port take 32 pins.
- Port 0, Port 1, Port 2, Port 3.
- Each port have 8 pins.
- When the external memory access is required then Port P0 is multiplexed for address bus and data bus that can be used to access external memory in conjunction with port P2. P0 acts as A0-A7 in address bus and D0-D7 for port data.
- It can be used for general purpose I/O if no external memory require
- The port P1 is a port dedicated for general I/O purpose.
- The other ports P0, P2 and P3 have dual role in addition to their basic I/O function.
Similar to P0, the port P2 can also play a role (A8-A15) in the address bus in conjunction with PORT P0 to access external memory.
- P3.0 can be used for serial receive input pin(RXD).
- P3.1 can be used for serial transmit output pin(TXD) in a serial port.
- P3.2 and P3.3 can be used as external interrupt pin(INT0 and INT1).
- P3.4 and P3.5 are used for external counter input pin(T0 and T1).
- P3.6 and P3.7 can be used as external data memory write and read control signal pins(WR and RD)read and write pins for memory access.
There are 21 SFRs.
The most frequently used SFRs to control and configure 8051 operations are:
1.TCON (Timer Control)
2.TMOD (Timer Mode)
3.TH0/TH1 and TL0/TL1 (Timers high and low bytes)
4.SCON (Serial port Control)
5.IP (Interrupt Priority)
6.IE ( Interrupt Enable).