
Programming
Chapter 4
AT-MIO-16D User Manual
4-54
© National Instruments Corporation
g.
Write FF28 to the Am9513A Command Register to arm Counter 4.
h.
Write FF05 to the Am9513A Command Register to select the Counter 5 Mode Register.
i.
Write 25 to the Am9513A Data Register to store the Counter 5 mode value.
j.
Write FF0D to the Am9513A Command Register to select the Counter 5 Load Register.
k.
Take the most significant 16 bits of the sample count and do the following:
•
If the least significant 16 bits of the sample count are all zeros or all zeros except for a 1
in the least significant bit, write the most significant 16 bits to the Am9513A Data
Register to store the Counter 5 load value.
•
Otherwise, add one to the most significant 16 bits of the sample count and write that
value to the Am9513A Data Register to store the Counter 5 load value.
l.
Write FF70 to the Am9513A Command Register to load and arm Counter 5.
m. Set the 16*/32 CNT 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 both Counters 4 and 5 reach
zero. Counters 4 and 5 begin counting A/D conversion pulses when a rising edge signal is
received on the STOP TRIG input. A/D conversion data stored before receipt of the STOP TRIG
signal are pretrigger samples.
4. Clear the A/D circuitry.
Before you start the data acquisition operation, the A/D FIFO must be emptied to clear out any
old A/D conversion results. You must do this emptying after the counters are programmed in
case any spurious edges were caused while programming the counters. Write 0 to the A/D Clear
Register to empty the FIFO (16-bit write).
5. Apply a trigger.
Once set up by the preceding steps, the data acquisition operation is initiated when a trigger is
received. A trigger can be provided in one of two ways–through software or through hardware.
To initiate the data acquisition operation through software, write 0 to the Start DAQ Register
(16-bit write).
To initiate the data acquisition operation through hardware, apply an active low pulse to the
START TRIG* pin on the AT-MIO-16D I/O connector. See the Data Acquisition Timing
Connections section in Chapter 2, Configuration and Installation, for START TRIG* signal
specifications.
Once the trigger is applied, Counter 3 generates pulses initiating A/D conversions once every
sample interval until the sample counter reaches 0.
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: ......