Specifications
Parallel I/O
Programming the Light Emitting Diode
• To control the LED, first enable the parallel port by
programming the OUT2 bit of the 82050 serial port (I/O port
address 3FCh, bit 3) with a logical 1.
• To turn on the LED, write a logical 1 to the second most
significant parallel I/O bit (I/O port address 220h, bit 6).
• To turn off the LED, write a logical 0 to the second most
significant parallel I/O bit (I/O port address 220h, bit 6).
Mixing I/O in a Single
Port
Each I/O signal is programmable for input or output operation. If
inputs and outputs are mixed in a single port, you must take special
care to always write logical 0s to the bit locations configured as
outputs.
For example, assume that the lower four bits of a port are inputs and
the upper four bits of the same port are outputs. For a read-modify-
write cycle, you must read the port, modify the output bits as
necessary, set the lower four bits to 0, and write the port.
12-7