User`s manual
82C55 PORT A DATA
BADR4 + 0
READ/WRITE
A0A1A2A3A4A5A6A7
01234567
82C55 PORT B DATA
BADR4 + 1
READ/WRITE
B0B1B2B3B4B5B6B7
01234567
Ports A and B may be programmed as input or output. Each is written to and read from in bytes,
although for control and monitoring purposes, individual bits are used.
Bit set/reset and bit read functions require that unwanted bits be masked out of reads and ORed into
writes.
82C55
PORT C DATA
BADR4 + 2
READ/WRITE
CL0CL1CL2CL3CH0CH1CH2CH3
C0C1C2C3C4C5C6C7
01234567
Table 6-3. Bit to Decimal to HEX Values
110
221
442
883
10164
20325
40646
801287
HEXDECIMALBIT
Port C can be used as one 8-bit port of either input or output, or it can be split into two, 4-bit ports which
can be independently input or output. The notation for the upper 4-bit port is PCH3 to PCH0, and for the
lower, PCL3 to PCL0.
Although it can be split, every read and write to port C carries eight bits of data so unwanted information
must be ANDed out of reads, and writes must be ORed with the current status of the other nibble.
OUTPUT PORTS
In 8255 mode 0 configuration, ports configured for output hold the output data written to them. This
output byte may be read back by reading a port configured for output.
INPUT PORTS
In 8255 mode 0 configuration, ports configured for input read the state of the input lines at the moment,
transitions are not latched.
32