![National Instruments AT-MIO-64F-5 Скачать руководство пользователя страница 158](http://html1.mh-extra.com/html/national-instruments/at-mio-64f-5/at-mio-64f-5_user-manual_3417320158.webp)
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.
Содержание 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: ......