© National Instruments Corporation
5-1
AT-MIO-64F-5 User Manual
Chapter 5
Programming
This chapter contains programming instructions for operating the circuitry on the AT-MIO-64F-5.
Programming the AT-MIO-64F-5 involves writing to and reading from the various registers on
the board. The programming instructions list the sequence of steps to take. The instructions are
language independent; that is, they instruct you to write a value to a given register, to set or clear
a bit in a given register, or to detect whether a given bit is set or cleared without presenting the
actual code.
Note:
If you plan to use a programming software package such as NI-DAQ or LabWindows
with your AT-MIO-64F-5 board, you need not read this chapter.
Register Programming Considerations
Several write-only registers on the AT-MIO-64F-5 contain bits that control a number of
independent pieces of the onboard circuitry. In the instructions for setting or clearing bits,
specific register bits should be set or cleared without changing the current state of the remaining
bits in the register. However, writing to these registers simultaneously affects all register bits.
You cannot read these registers to determine which bits have been set or cleared in the past;
therefore, you should maintain a software copy of the write-only registers. This software copy
can then be read to determine the status of the write-only registers. To change the state of a
single bit without disturbing the remaining bits, set or clear the bit in the software copy and write
the software copy to the register.
Resource Allocation Considerations
Counters 1, 2, and 5 of the Am9513A Counter/Timer are available at the I/O connector for
general-purpose use. These counters can only be used so long as this does not conflict with an
internal operation in progress on the board that is already using the desired counter. Table 5-1
lists the five counters in the Am9513A Counter/Timer and enumerates what they are used for in
each operation.
Table 5-1. Am9513A Counter/Timer Allocations
Counter
DAQ Operation
Waveform Operation
1
2
3
4
5
Scan division
Scan division
Sample interval
Sample count
Sample count (> 65,536)
Updating/cycle counting/pulsed waveform
Updating/cycle counting/pulsed waveform
Updating
N/A
Updating/cycle counting
Table 5-1 provides a general overview of the AT-MIO-64F-5 resources to ensure there are no
conflicts when using the counters/timers. As an example, if an interval scanning data acquisition
sequence that requires less than 65,537 samples is in operation, Counters 2, 3, and 4 of the
Am9513A are reserved for this purpose. This leaves Counters 1 and 5 available for general-
purpose or waveform generation use.
Содержание AT-MIO-64F-5
Страница 13: ......
Страница 16: ......
Страница 200: ......
Страница 201: ......
Страница 202: ......
Страница 203: ......
Страница 204: ......
Страница 205: ......
Страница 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: ......