82C55 CONTROL REGISTER
BADR4 + 3
WRITE
Group B
Group A
CL
B
M1
CU
A
M2
M3
MS
0
1
2
3
4
5
6
7
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
Output
0
0
0
0
Input
1
1
1
1
INDEPENDENT FUNCTION
CH
CL
B
A
Bi-Directional Bus
Mode 2
X
1
Strobed Input / Output
Mode 1
1
0
Input / Output
Mode 0
1
0
GROUP A FUNCTION
M2
M3
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
IN
IN
IN
IN
155
9B
1
1
1
1
OUT
IN
IN
IN
154
9A
0
1
1
1
IN
OUT
IN
IN
153
99
1
0
1
1
OUT
OUT
IN
IN
152
98
0
0
1
1
IN
IN
OUT
IN
147
93
1
1
0
1
OUT
IN
OUT
IN
146
92
0
1
0
1
IN
OUT
OUT
IN
145
91
1
0
0
1
OUT
OUT
OUT
IN
144
90
0
0
0
1
IN
IN
IN
OUT
139
8B
1
1
1
0
OUT
IN
IN
OUT
138
8A
0
1
1
0
IN
OUT
IN
OUT
137
89
1
0
1
0
OUT
OUT
IN
OUT
136
88
0
0
1
0
IN
IN
OUT
OUT
131
83
1
1
0
0
OUT
IN
OUT
OUT
130
82
0
1
0
0
IN
OUT
OUT
OUT
129
81
1
0
0
0
OUT
OUT
OUT
OUT
128
80
0
0
0
0
CL
B
CU
A
DEC
HEX
D0
D1
D3
D4
NOTE: D7 is always 1; D6, D5, and D2 are always 0.
33
Содержание PCIM-DAS1602/16
Страница 4: ...This page is blank ...
Страница 48: ...For your notes 44 ...