Programming
Chapter 5
AT-MIO-64F-5 User Manual
5-14
© National Instruments Corporation
4.
Write the 16 LSBs of the sample count value minus 1 to the Am9513A Data Register to
store the Counter 4 load value.
¥
If the 16 LSBs are all 0, write FFFF.
5.
Write FF48 to the Am9513A Command Register to load Counter 4.
6.
Write 0 to the Am9513A Data Register to store 0 into the Load Register for Counter 4
reloading.
7.
Write FF28 to the Am9513A Command Register to arm Counter 4.
8.
Write FF05 to the Am9513A Command Register to select the Counter 5 Mode Register.
9.
Write 25 to the Am9513A Data Register to store the Counter 5 mode value.
10.
Write FF0D to the Am9513A Command Register to select the Counter 5 Load Register.
11.
Take the 16 MSBs of the sample count and complete the following steps:
¥
If the 16 LSBs of the sample count are all 0 or all 0 except for a 1 in the LSB, write the
16 MSBs to the Am9513A Data Register to store the Counter 5 load value.
¥
Otherwise, add 1 to the 16 MSBs of the sample count and write that value to the
Am9513A Data Register to store the Counter 5 load value.
12.
Write FF70 to the Am9513A Command Register to load and arm Counter 5.
13.
Set the CNT32/16* bit in Command Register 1 to notify the hardware that both Counters 4
and 5 will be used as the sample counter.
After you complete this programming sequence, Counter 4 is configured to count A/D
conversion pulses generated by Counter 3, and Counter 5 decrements every time Counter 4
reaches zero. The data acquisition operation is terminated when Counter 4 and Counter 5 reach
zero.
Programming the Scan-Interval Counter
Counter 2 of the Am9513A Counter/Timer is used as the scan-interval counter. Counter 2 can be
programmed to generate a pulse once every
N
counts.
N
is referred to as the scan interval, which
is the time between successive scan sequences programmed into the mux-channel gain memory.
N
can be between 2 and 65,536. One count is equal to the period of the timebase clock used by
the counter. The following clocks are available internal to the Am9513A 5 MHz, 1 MHz,
100 kHz, 10 kHz, 1 kHz, and 100 Hz. In addition, the scan-interval timer can use signals
connected to any of the Am9513A SOURCE input pins.
To program the scan-interval counter, use the following programming sequence. All writes are
16-bit operations. All values given are hexadecimal.
1. Write FF02 to the Am9513A Command Register to select the Counter 2 Mode Register.
Summary of Contents for AT-MIO-64F-5
Page 13: ......
Page 16: ......
Page 200: ......
Page 201: ......
Page 202: ......
Page 203: ......
Page 204: ......
Page 205: ......
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: ......