
Chapter 4
Programming
© National Instruments Corporation
4-73
AT-MIO-16D User Manual
To enable digital output port 0, set the DOUT0EN bit in Command Register 2. To enable digital
output port 1, set the DOUT1EN bit in Command Register 2. When a digital output port is
enabled, the contents of the MIO-16 Digital Output Register are driven onto the digital lines
corresponding to that port. The digital output for both ports 0 and 1 are updated by writing the
desired pattern to the MIO-16 Digital Output Register.
The input ports must be enabled for an external device to drive the MIO-16 digital I/O lines.
Clear the DOUT0EN bit in Command Register 2 if an external device is driving digital I/O lines
ADIO<3..0>. Clear the DOUT1EN bit in Command Register 2 if an external device is driving
digital I/O lines BDIO<3..0>. The MIO-16 Digital Input Register can then be read to monitor
the state of the digital I/O lines as driven by the external device.
The logic state of all eight MIO-16 digital I/O lines can be read from the MIO-16 Digital Input
Register. If the digital output ports are enabled, the MIO-16 Digital Input Register serves as a
read-back register; that is, you can determine how the AT-MIO-16D is driving the digital I/O
lines by reading the MIO-16 Digital Input Register.
Programming the Am9513A Counter/Timer
Counters 1, 2, and 5 of the Am9513A Counter/Timer are available for general-purpose timing
applications. The programmable frequency output pin FOUT is also available as a timing signal
source. These applications and a general description of the Am9513A Counter/Timer are
included in the Data Acquisition Timing Connections section in Chapter 2, Configuration and
Installation. The Timing I/O Circuitry section in Chapter 3, Theory of Operation, explains how
the Am9513A is used on the AT-MIO-16D board.
Initialization of the Am9513A as required by the AT-MIO-16D and specific programming
requirements for the sample-interval and sample counters are given earlier in this chapter. For
general programming details for Counters 1, 2 and 5, and the programmable frequency output,
refer to Appendix E, Am9513A Data Sheet.
Write-and-read operations to the Am9513A registers require a minimum 1.5-
µ
sec recovery time
between operations. If two operations to the Am9513A occur within 1.5
µ
sec, the second
operation is ignored by the AT-MIO-16D. Caution should be taken when writing to the
Am9513A registers so that this access recovery time is not violated.
In programming the Master Mode Register, keep the following considerations in mind:
•
The Am9513A must be used in 16-bit bus mode.
•
The scalar control should be set to BCD division for correct operation of the clocks as
described under the Programming Multiple A/D Programming Conversions on a Single Input
Channel section earlier in this chapter.
RTSI Bus Trigger Line Programming Considerations
The RTSI switch connects signals on the AT-MIO-16D to the seven RTSI bus trigger lines. The
RTSI switch has seven pins labeled A<6..0> connected to AT-MIO-16D signals and seven pins
labeled B<6..0> connected to the seven RTSI bus trigger lines. Table 4-7 shows the signals
connected to each pin.
Summary of Contents for AT-MIO-16D
Page 16: ......
Page 23: ......
Page 185: ......
Page 206: ......
Page 207: ......
Page 208: ......
Page 209: ......
Page 210: ......
Page 211: ......
Page 212: ......
Page 213: ......
Page 214: ......
Page 215: ......
Page 216: ......
Page 217: ......
Page 218: ......
Page 219: ......
Page 220: ......
Page 221: ......
Page 222: ......
Page 223: ......
Page 224: ......
Page 225: ......
Page 226: ......
Page 227: ......
Page 228: ......
Page 229: ......
Page 230: ......
Page 231: ......
Page 232: ......
Page 233: ......
Page 234: ......
Page 235: ......
Page 236: ......
Page 237: ......
Page 238: ......
Page 239: ......
Page 240: ......
Page 241: ......
Page 242: ......
Page 243: ......
Page 244: ......
Page 246: ......
Page 247: ......
Page 248: ......
Page 249: ......
Page 250: ......
Page 251: ......
Page 252: ......
Page 253: ......
Page 254: ......
Page 255: ......
Page 256: ......
Page 257: ......
Page 258: ......
Page 259: ......
Page 260: ......
Page 261: ......