User`s manual

82C55 CONTROL REGISTER
BADR4 + 3
WRITE
Group BGroup A
CLBM1CUAM2M3MS
01234567
The 8255 can be programmed to operate in Input/ Output (mode 0), Strobed Input/ Output (mode 1) or
Bi-Directional Bus (mode 2).
When the PC is powered up or RESET, the 8255 is reset. This places all 24 lines in Input mode and no
further programming is needed to use the 24 lines as TTL inputs.
To program the 82C55 for other modes, assemble the following control code byte into an 8-bit byte.
MS = Mode Set. 1 = mode set active
Output0000
Input1111
INDEPENDENT FUNCTIONCHCLBA
Bi-Directional BusMode 2X1
Strobed Input / OutputMode 110
Input / OutputMode 010
GROUP A FUNCTIONM2M3
M1 = 0 is mode 0 for group B. Input / Output
M1 = 1 is mode 1 for group B. Strobed Input / Output
All four groups can be independently programmed in one of several modes. The most commonly used
mode is mode 0, input / output mode. The codes for programming the 82C55 in mode 0 are shown in
Table 6-4.
Table 6-4. Mode 0 Configuration Codes for 82C55
ININININ1559B1111
OUTINININ1549A0111
INOUTININ153991011
OUTOUTININ152980011
ININOUTIN147931101
OUTINOUTIN146920101
INOUTOUTIN145911001
OUTOUTOUTIN144900001
INININOUT1398B1110
OUTININOUT1388A0110
INOUTINOUT137891010
OUTOUTINOUT136880010
ININOUTOUT131831100
OUTINOUTOUT130820100
INOUTOUTOUT129811000
OUTOUTOUTOUT128800000
CLBCUADECHEXD0D1D3D4
NOTE: D7 is always 1; D6, D5, and D2 are always 0.
33