Microcontoller - 8051 Architecture and Block Diagram
Microcontroller is a small computer on a single integrated circuit generally used in control applications. It contains all essential components such as CPU, RAM, ROM / EPROM, I/O lines etc. These devices used to control products like automobile engine control systems, medical devices, office machines, remote controls, power tools and appliances, toys and in other variety of products developed using embedded systems.
8051 Microcontroller Architecture and Block Diagram:
8051 microcontroller is a second generation 8 bit microcontroller
used for a variety of applications with limited calculations and control
strategies. Microcontrollers are used for industrial and commercial control applications,
instrumentations, appliance control etc.
8051 microcontroller contains Boolean processor, serial
port (full duplex), power saving circuit along with 8 bit CPU, RAM, ROM, Timer
and Counter, I/O lines.
Pin 1-8 – Port 1: 8-bit bidirectional I/O port with internal pull-up
resisters. It is just an I/O port and does not perform any other task.
Pin 9 – RST: Reset input pin used to reset the microcontroller to
its initial position.
Pin 10-17 – Port 3: 8-bit bidirectional I/O port with internal pull-up
resisters. It also performs special functions listed below:
|
Port 3 Pins |
Function |
Description |
|
P3.0 |
RxD |
Serial Input |
|
P3.1 |
TxD |
Serial Output |
|
P3.2 |
INT0 |
External Interrupt 0 |
|
P3.3 |
INT1 |
External Interrupt 1 |
|
P3.4 |
T0 |
Timer 0 |
|
P3.5 |
T1 |
Timer 1 |
|
P3.6 |
WR |
External Memory Write |
|
P3.7 |
RD |
External Memory Read |
Pin 18-19: XTAL1 and XTAL1 pins respectively. These pins are used for connecting an external crystal to get the system clock.
Pin 20 – GND: Ground pin. It provides the power supply to the
circuit.
Pin 21-28 – Port 2: A bidirectional I/O port. Higher order address bus
signals are multiplexed with this bidirectional port.
Pin 29 – PSEN: Program Enable Pin. Using this PSEN pin external
program memory can be read.
Pin 30 – ALE/PROG: Address Latch Enable pin. Using this pin, external
address can be separated from data.
Pin 31 – EA/VPP: Named as external Access Enable Pin (EA). It is used
to enable or disable the external memory interfacing.
Pin 32-39 – Port 0: A bidirectional I/O pins but without any internal
pull-ups. Hence, it requires external pins in order to use port 0 pins as I/O
port. Lower order data and address bus signals are multiplexed with this port.
Pin 40 – VCC: This pin is used to supply power to the circuit.
8051 Interrupts:
Interrupt is a process of creating a temporary halt in
the main program execution and then pass the control to the external sources in
order to execute their related tasks and then passes the control to the main
program where it is halted.
There are 5 Interrupt signals in 8051 microcontrollers,
one from serial port, two from timers, two from external interrupts which are listed
below:
- INT0
- TF0
- INT1
- TF1
- RI / TI
Note: The no. of interrupt sources differs from version to version. It varies
from 5 to 15.
By setting and clearing a bit in the special function
register Interrupt Enable – IE each of the interrupts can individually be
enabled and disabled. The IE register also contains a global disable bit, which
disables all the interrupts.
By setting and clearing bits in the special function register Interrupt Priority register – IP each interrupt can also be programmed to one of the priority level scheme.
Note that a low priority interrupt can be interrupted
by a high priority interrupt, but it cannot be interrupted by another low
priority interrupt. And also a high priority interrupt can't be interrupted by
a low priority interrupt.

Comments
Post a Comment