Page 75 - CITS - Electronic Mechanic - TT - 2024
P. 75
ELECTRONICS MECHANIC - CITS
Output Configuration: When the pin is configured as an output, it acts as an “open drain”. By applying logic 0 to
a port bit, the appropriate pin will be connected to ground (0V). By applying logic 1, the external output will keep
on “floating”. To apply logic 1 (5V) on this output pin, it is necessary to build in an external pull-up resistor.
Note: Only in case P0 is used for addressing external memory, the microcontroller will provide
internal power supply source to supply its pins with logic one. There is no need to add external
pull-up resistors.
Port 1
P1 is a true I/O port, because it doesn’t have any alternative functions as is the case with P0 but can be configured
as general I/O only. It has a pull-up resistor built-in and is completely compatible with TTL circuits.
Port 2
P2 acts similarly to P0 when external memory is used. Pins of this port occupy addresses intended for external
memory chips. This time it is about the higher address byte with addresses A8-A15. When no memory is added,
this port can be used as a general input/output port showing features like P1.
Port 3
All port pins can be used as general I/O, but they also have an alternative function. To use these alternative
functions, a logical one (1) must be applied to the appropriate bit of the P3 register. In terms of hardware, this port
is like P0, with the difference that its pins have a pull-up resistor built in.
60
CITS : E & H - Electronics Mechanic - Lesson 34 - 42