Manual PCIe-DA16-6
14
Programming the Digital I/O Circuit
The digital I/O circuit is comprised of a direction control latch, and two bi-directional
buffers with 10K pull-ups.
The cards are designed to operate as follows:
a.
There are two 8-bit ports (A and B)
b.
Either 8-bit port can be configured as an input or an output
c.
Outputs are latched
d.
Inputs are not latched
e.
The card is initialized in the input mode
A write-only, 8-bit register is used to set the mode and direction of the ports. At Power-
Up or Reset, all I/O lines are set as inputs. Each GROUP should be configured during
initialization by writing to the control registers even if the ports are going to be used as
inputs. The DIO Direction-control register is located at base a23. Bit
assignments in each of these control registers are as follows:
Bit
Assignment
Function
D0
Reserved, always use set to zero Reserved, always use set to zero
D1
Port B
1 = Input, 0 = Output
D2
Reserved, always use set to zero Reserved, always use set to zero
D3
D4
Port A
1 = Input, 0 = Output
D5,D6 Reserved, always use set to zero Reserved, always use set to zero
D7
Mode Set (see note 1)
Scratchpad
Table 5-3:
Control Register Bit Assignments
Note 1: This bit is a read/write scratchpad