![background image](http://html.mh-extra.com/html/blue-chip/adc-42/adc-42_user-manual_2775482028.webp)
Page 20
Input Connections
Page 20
Blue Chip Technology Ltd.
01271014.doc
In mode 2 data is transferred via one bi-directional 8 bit port (A) with
handshakes (Port C).
Control
Control
Sets All
Sets All
Sets High
Sets Low
Word
Word
of
of
4 Bits of
4 Bits of
(Hex)
(Decimal)
Port A To
Port B To
Port C To
Port C To
80
128
Output
Output
Output
Output
81
129
Output
Output
Output
Input
82
130
Output
Input
Output
Output
83
131
Output
Input
Output
Input
88
136
Output
Output
Input
Output
89
137
Output
Output
Input
Input
8A
138
Output
Input
Input
Output
8B
139
Output
Input
Input
Input
90
144
Input
Output
Output
Output
91
145
Input
Output
Output
Input
92
146
Input
Input
Output
Output
93
147
Input
Input
Output
Input
98
152
Input
Output
Input
Output
99
153
Input
Output
Input
Input
9A
154
Input
Input
Input
Output
9B
155
Input
Input
Input
Input
Table 3 - Control Word Table
4.3.2. Example Program
The following program sets up the ADC chip with:
Port A = Input
Port B = Output
Port C = Input
and reads channels A and C whilst outputting 255 to channel B.
10
INPUT “BASE ADDRESS”; BASE
20
OUT BASE+11,&H99
30
A = INP (BASE+8)
40
OUT BASE+9, 255
50
C = INP (BASE+10)
60
PRINT A, C
70
GOTO 30