Programming
Chapter 5
AT-MIO-64F-5 User Manual
5-12
© National Instruments Corporation
To program the sample-interval counter for internal conversion signals, use the following
programming sequence. All writes are 16-bit operations. All values given are hexadecimal.
1. Write FF03 to the Am9513A Command Register to select the Counter 3 Mode Register.
2. Write the mode value to the Am9513A Data Register to store the Counter 3 mode value.
Am9513A counter mode information can be found in Appendix E,
AMD Am9513A Data
Sheet
. Use one of the following mode values:
8225
Ð Selects 5 MHz clock (from SOURCE2 pin)
8B25 Ð Selects 1 MHz clock
8C25 Ð Selects 100 kHz clock
8D25 Ð Selects 10 kHz clock
8E25 Ð Selects 1 kHz clock
8F25
Ð Selects 100 Hz clock
8525
Ð Selects signal at SOURCE5 input as clock (counts the rising edge of the signal,
6 MHz maximum)
3. Write FF0B to the Am9513A Command Register to select the Counter 3 Load Register.
4. Write 2 to the Am9513A Data Register to store the Counter 3 load value.
5. Write FF44 to the Am9513A Command Register to load Counter 3.
6. Write FFF3 to the Am9513A Command Register to step Counter 3 down to 1.
7. Write the desired sample interval to the Am9513A Data Register to store the Counter 3 load
value:
¥
If the sample interval is between 2 and FFFF (65,535 decimal), write the sample interval
to the Am9513A Data Register.
¥
If the sample interval is 10000 (65,536 decimal), write 0 to the Am9513A Data Register.
8. Write FF24 to the Am9513A Command Register to arm Counter 3.
After you complete this programming sequence, Counter 3 is configured to generate A/D
conversion pulses as soon as application of a trigger causes it to be enabled.
Programming the Sample Counter(s)
Counters 4 and 5 of the Am9513A Counter/Timer are used as the sample counter. The sample
counter tallies the number of A/D conversions initiated by Counter 3 or EXTCONV* and
inhibits conversions when the desired sample count is reached. If the desired sample count is
65,536 or less, only Counter 4 needs to be used, making Counter 5 available for general-purpose
timing applications. If the desired sample count is greater than 65,536, both Counters 4 and 5
must be used.
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: ......