Input Connections
Page
17
Blue Chip Technology Ltd.
01271014.doc
Page 17
These four ports are mapped into the ADC port as map as follow:
Base + 8 = Programmable Digital I/O Port A
Base + 9 = Programmable Digital I/O Port B
Base + 10 = Programmable Digital I/O Port C
Base + 11 = Control Port
A typical sequence of events to use this feature would be:
i.
Decide on the input/output mix and write the appropriate code to
BASE+11. (See 6.3.1).
ii
Read from the selected input port.
or
iii.
Write to the selected output port. As appropriate.
An example program using this sequence is given in the next section.
7
6
5
4
3
2
1
0
Address
Base + 8
DATA
(8255 PORT A)
7
6
5
4
3
2
1
0
Base + 9
DATA
(8255 PORT B)
7
6
5
4
3
2
1
0
Base + 10
DATA
(8255 PORT C)