EEE 872 Assignment

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

NAME : OMOROGIUWA,OSARUMWENSE BATESON

COURSE CODE: EEE872


COURSE TITLE : COMPUTER AND ELECTRONIC EQUIPMENT DESIGN
ASSIGNMENT
QUESTION : Following the approach taken in class, describe ports P0,P1,P2 and P3 of the 8051
Microcontroller
SOLUTION:
The 8051 microcontroller is versatile; it is made up of 8-bit data bus and 16-bit address bus for
accessing external memory.
It is a 40 pin device and had 32 pins alloted as input/output ports.These 32 pins are grouped into four
ports viz are: P0,P1,P2 and P3 respectively.Shown in the figure 1, shows the pin out summary of the
microcontroller.

Figure 1

1
A. PORT 0
It is located on pins 32 through to pin 39 on the 8051 microcontoller.It is made up of 8 pins identified
as AD0,AD1,AD2,AD3,AD4,AD5,AD6 and AD7 respectively.Port 0 is a bidirectional general
purpose I/O port multiplexed with data and address bus.
The data bus is the accumulator(memory bit) lines that can be processed at one time.Each pin can
hold a binary digit of either a 1 or 0.
This port can be used to perform dual function of storing and processing data and access external
memory because it is multiplexed data and address bus.
As shown in figure 1 above,port 0 pins are labelled as P0.0(AD 0), P0.1,P0.2,P0.3,P0.4,P0.5,P0.6
and P0.7
B. PORT 1
It is located physically on pin 1 through pin 8 of the 8051 microcontroller.It is a bidirectional I/O port
used to interface external devices.The pins are labelled P1.0 through to P1.7 on figure 1.
C. PORT 2
The port is located on pin 21 through to pin 28 of the microcontroller.It is an 8bit input/output
address bus used for accessing external devices.It can be used to access external code memory of
more than 256 bytes, or more than 2 n memory bytes(n=8) of external data byte memory where such
expansion is needed in the design.The pins are labelled as A8,A9,A10,A11,A12,A13,A14 and A15
respectively.

D. PORT 3
This is a bidirectional I/O port located on pin 10 through pin 17.Port 3 pins are multifunctional
input/output port with each pin in relation to special function/purpose as shown in Table 1 below:

S/N PORT SYMBO ALTERNATE FUNCTION


PIN L
1 P3.0 RXD Used to receive serial data from external device
2 P3.1 TXD Used to transmit serial data to external device
3 P3.2 Hardware interrupt 0
4 P3.3 Hardware interrupt 1
5 P3.4 T0 Input terminal for counter 0
6 P3.5 T1 Input terminal for counter 1
7 P3.6 Used to write to external memory device
8 P3.7 Used to read from external memory device

2
3

You might also like