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.
Содержание AT-MIO-16D
Страница 16: ......
Страница 23: ......
Страница 185: ......
Страница 206: ......
Страница 207: ......
Страница 208: ......
Страница 209: ......
Страница 210: ......
Страница 211: ......
Страница 212: ......
Страница 213: ......
Страница 214: ......
Страница 215: ......
Страница 216: ......
Страница 217: ......
Страница 218: ......
Страница 219: ......
Страница 220: ......
Страница 221: ......
Страница 222: ......
Страница 223: ......
Страница 224: ......
Страница 225: ......
Страница 226: ......
Страница 227: ......
Страница 228: ......
Страница 229: ......
Страница 230: ......
Страница 231: ......
Страница 232: ......
Страница 233: ......
Страница 234: ......
Страница 235: ......
Страница 236: ......
Страница 237: ......
Страница 238: ......
Страница 239: ......
Страница 240: ......
Страница 241: ......
Страница 242: ......
Страница 243: ......
Страница 244: ......
Страница 246: ......
Страница 247: ......
Страница 248: ......
Страница 249: ......
Страница 250: ......
Страница 251: ......
Страница 252: ......
Страница 253: ......
Страница 254: ......
Страница 255: ......
Страница 256: ......
Страница 257: ......
Страница 258: ......
Страница 259: ......
Страница 260: ......
Страница 261: ......