18
•
Digital I/O Programming
CH4 PB4
2D1H
EMULATE AS 8255 PB
CH4 PC4
2D2H
EMULATE AS 8255 PC
CONTROL WORD CH4
2D3H
EMULATE AS 8255 CW
CH5 PA5
2D4H
EMULATE AS 8255 PA
CH5 PB5
2D5H
EMULATE AS 8255 PB
CH5 PC5
2D6H
EMULATE AS 8255 PC
CONTROL WORD CH5
2D7H
EMULATE AS 8255 CW
Table 4.2 Ports' I/O address table
(Base Address = 2C0H)
3.2 Mode 0 of 8255 PPI
The ACL-7122 can emulates MODE 0 of 8255 PPI, and it comes
equipped with six 50-pin male IDC connectors that interface with
OPTO-22 racks 8, 16, and 24.
The basic functions definition of 8255 mode 0 are :
w
Two 8-bit I/O ports - PA and PB
w
Two nibble-wide (4-bit) ports - PC upper and PC lower
w
Any ports can be used for both input and output
w
Outputs are latched whereas inputs are not latched
w
16 different input/output configurations are available
Two of the I/O lines (PC-0, PC-3) of each channel can be used to
generate a hardware interrupt.
The I / O of ACL-7122 emulates as six 8255 programmable
peripheral interface chips, the control word is to program PA, PB
and PC as input port or output port. Table shows the summarize
of control word (D0 - D4), and mode state (Mode 0 - Mode 15).
Mode
Config.
Value
D4
D3
D1
D0
PORT
A
PORT C
UPPER
PORT
B
PORT C
LOWER
0
80H
0
0
0
0
O/P
O/P
O/P
O/P
1
81H
0
0
0
1
O/P
O/P
O/P
I/P
2
82H
0
0
1
0
O/P
O/P
I/P
O/P
3
83H
0
0
1
1
O/P
O/P
I/P
I/P