PORT C DATA
BASE ADDRESS +402h
7
6
C7
C6
CH3
CH2
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 CH3 - CH0, and for the
lower, CL3 - CL0.
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 can 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.
8255 CONTROL REGISTER
BASE ADDRESS +403h
7
6
MS
M3
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 8255 for other modes, the following control code byte must be assembled into an 8 bit
byte.
MS = Mode Set. 1 = mode set active
M3
M2
0
1
Mode 0
0
1
Mode 1
1
X
Mode 2
A
B
1
1
0
0
5
4
C5
C4
CH1
CH0
5
4
M2
A
Group A
Input / Output
Strobed Input / Output
Bi-Directional Bus
CL
CH
1
1
Input
0
0
Output
3
C3
C2
CL3
CL2
3
CU
M1
GROUP A FUNCTION
INDEPENDENT FUNCTION
28
2
1
C1
CL1
2
1
B
Group B
0
C0
CL0
0
CL
Need help?
Do you have a question about the CIO-DAS1601/12 and is the answer not in the manual?