21.1 Data Acquisition Circuit Digital I/O Ports
These 3 ports are called A, B, and C and are accessible on the data acquisition I/O connector J17. Ports A and B can be configured as either input or output, and each half of port C can be configured independently for input or output. The data is read and written with the registers at base+8 through base+10, and the direction configuration byte is located at register Base+11. See the detailed register description in chapter 14 on page 46.
To use these ports, first configure the desired directions by writing the appropriate configuration value to base+11. Then read or write data to the 3 I/O ports as needed. All I/O ports are in input mode on power-up or after a board reset.
The upper 4 bits of port C serve dual purposes. If control bit DIOCTR=0, these bits are normal DIO lines and can be read or written via the register at base+10. If DIOCTR=1, these bits are reassigned as counter/timer signals:
J17 Pin No.
DIOCTR = 1
DIOCTR = 0
21
Gate 0
DIO C4
22
Gate 1
DIO C5
23
Clk 1
DIO C6
24
Out 0
DIO C7
Register Map for Data Acquisition Circuit Digital I/O Ports:
Base +
R/W
7
6
5
4
3
2
1
0
8
R/W
A7
A6
A5
A4
A3
A2
A1
A0
9
R/W
B7
B6
B5
B5
B3
B2
B1
B0
10
R/W
C7
C6
C5
C4
C3
C2
C1
C0
11
R/W
DIOCTR
DAMODE
DASIM
DIRA
DIRCH
-
DIRB
DIRCL
A7-0
Digital I/O port A
B7-0
Digital I/O port B
C7-0
Digital I/O port C
DIOCTR
Se description above and chapter 22 for DIOCTR’s effect on I/O connector J17
DIRA
Port A direction. 0 = output, 1 = input
DIRB
Port B direction. 0 = output, 1 = input
DIRCH
Port C bits 7-4 direction: 0 = output, 1 = input. This bit has no effect if DIOCTR=1.
DIRCL
Port C bits 3-0 direction: 0 = output, 1 = input
Last updated
Was this helpful?