Chapter 5
Theory of Operation and Register-Level Programming
5-12
©
National Instruments Corporation
Configure Counter 1 to Control the MIO Board Scanning Clock
Counter 1 on the MIO board is used to divide the onboard scanning clock
controlling the scanning counter so that the onboard multiplexers switch
at a slower rate than the AMUX-64T multiplexers. To program counter 1,
use the following programming sequence. All operations are 16-bit write
operations. All values given are hexadecimal.
•
Write FF01 to the Am9513 Command Register to select the Counter 1
Mode Register.
•
Write 0325 (hex) to the Am9513 Data Register to store the Counter 1
mode value.
•
Write FF09 to the Am9513 Command Register to select the Counter 1
Load Register.
•
Write the divide-down value to the Am9513 Data Register to load
counter 4. The divide-down values are as follows:
–
One AMUX-64T board:
4 (hex)
–
Two AMUX-64T boards:
8 (hex)
–
Four AMUX-64T boards:
10 (hex)
•
Write FF41 to the Am9513 Command Register to load counter 1.
•
Write FFF1 to the Am9513 Command Register to step counter 1.
•
Write FF21 to the Am9513 Command Register to arm counter 1.
After you apply this programming sequence, counter 1 is configured to
divide-down SCANCLK during A/D conversions.
Set the SCANDIV Bit in MIO Command Register 1
To enable SCANCLK division, set the SCANDIV bit in Command
Register 1.
After this programming sequence, the analog inputs on the AMUX-64T are
automatically scanned during MIO-scanned A/D conversion operations.