
20
•
Control Programming
3.2 8255 Mode 0
The PET-48DIO can emulates MODE 0 of 8255 PPI, and it comes
equipped with two 50-pin male IDC connectors that interface with
OPTO-22 racks 8, 16, and 24.
The basic function definition of 8255 mode 0 is :
l
Two 8-bit I/O ports - PA and PB
l
Two nibble-wide ( 4-bit) ports - PC upper and PC lower
l
Any ports can be used for both input and output
l
Outputs are latched whereas inputs are not latched
l
16 different input/output configurations are available
PC0 is used to generate a hardware interrupt, and PC4 is used to
control programmable interrupt.
The I / O of PET-48DIO emulates as one 8255 programmable
peripheral interface chip, 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 states (Mode 0 - Mode 15) .
1
0 0
?
?
?
0
?
1: input
0: output for Port C low
nibble
1: input
0: output for Port B
1: input
0: output for Port C high nibble
1: input
0: output for Port A
D7 D6 D5 D4 D3 D2 D1 D0