Professional Documents
Culture Documents
IOPorts
IOPorts
1
Port registers ( P0, P1, P2, P3)
2
3
Architecture of 8051 ports
4
Port 3
▪ Alternate function signals
▪ I/O port
Port 1
▪ I/O port
Port 0 is truly bi-directional port
Other ports are quasi-bi-directional ports.
5
Internal architecture of Port 0 pin
6
Internal architecture of Port 1 pin
7
Internal architecture of Port 2 pin
8
Internal architecture of Port 3 pin
9
Output latch
10
FET pull-up at output
If the data written in port
latch is ‘1’ the Q outputs
‘0’ which turns the FET(FL)
off. So, at output pin the
data available would be ‘1’.
11
Read buffer for port pin
To implement the reading
mechanism through the same port
pin, an extra buffer is introduced,
between port pin and the internal
data bus.
‘READ PIN’- control for reading
the input buffer. When activated,
port-pin data is directly available
at the internal data bus, provided
that FET(FL) is off.
13
For easier comparison and
understanding
14
External code memory
WR
RD
PSEN OE
ALE 74LS373 CS
G
P0.0 A0
D
P0.7 A7
D0
D7
EA
P2.0 A8
P2.7 A15
8051 ROM
External data memory
WR WR
RD RD
PSEN
ALE 74LS373 CS
G
P0.0 A0
D
P0.7 A7
D0
D7
EA
P2.0 A8
P2.7 A15
8051 RAM