
Manual Number: 00650-004-5
Page 5-6
ADIO1600 Manual
Programming Example
The 40-pin IDC connector provides access to the 8255 PIO to provide the 24 bits of Input and
Output. These 24 bits are divided into three 8-bit ports: A, B and C. Port C is further divided into
two 4-bit ports:
C-Lower and C-Upper.
Register Access
The 8255 section is mapped into 4 bytes in the IBM I/O space. The address definitions are:
e
s
a
B
+
s
s
e
r
d
d
A
x
e
H
0
1
A
tr
o
P
e
ti
r
W
/
d
a
e
R
x
e
H
1
1
B
tr
o
P
e
ti
r
W
/
d
a
e
R
x
e
H
2
1
C
tr
o
P
e
ti
r
W
/
d
a
e
R
x
e
H
3
1
r
e
t
si
g
e
R
y
l
n
O
e
ti
r
W
To access the board from BASIC, for example:
1. Determine which ports are to be for input and which for output. Determine the proper bit pattern
to write to the CONTROL REGISTER as discussed in the following section.
For example, for a configuration of:
Port A
Input
Port B
Output
Port C-Upper
Input
Port C-Lower
Output
The bit pattern would be 1001 1000 (Hex 98). Use the BASIC OUT statement to write to the
CONTROL REGISTER (refer to the next section for more detail on the CONTROL REGISTER):
10 BASEADDR = &H300
20 OUT B&H13, &H98
30 X=INP(B &H10):Y=INP(B&H12)
'READ PORTS A,C
40 PRINT X;Y
'PRINT THE VALUES
50 OUT B&H11,255
'TURN OFF PORT B 'RELAYS
60 OUT B&H12,15
'TURN ON 4 BITS OF C
Содержание ADIO1600 Series
Страница 1: ...ADIO1600 Series Product Manual MANUAL NUMBER 00650 004 5D ...
Страница 4: ...Page iv This page intentionally left blank ...
Страница 8: ...Page viii This page intentionally left blank ...
Страница 17: ...Manual Number 00650 004 5 Page 2 4 ADIO1600 Manual Figure 2 1 ADIO1600 Block Diagram ...