beautypg.com

Initializing the am9513a, Initializing the am9513a -3 – National Instruments AT-MIO-16X User Manual

Page 172

background image

Chapter 5

Programming

© National Instruments Corporation

5-3

AT-MIO-16X User Manual

4.

Disable all RTSI switch connections (see Programming the RTSI
Switch
section later in this chapter).

This sequence leaves the AT-MIO-16X circuitry in the following state:

DMA and interrupts are disabled.

The DMA circuitry is cleared.

The outputs of counter/timers are in the high-impedance state.

The analog input circuitry is initialized.

The analog output is in immediate update mode.

The ADC and DAC FIFOs are cleared.

The DIO ports A and B are set for input mode.

Initializing the Am9513A

Use the following sequence to initialize the Am9513A Counter/Timer.
All writes are 16-bit operations. All values are given in hexadecimal.

After this sequence of writes, the Am9513A Counter/Timer is in the
following state:

16-bit mode is enabled.

The BCD scaler division is selected.

The FOUT signal is turned off.

All counter OUT output pins are set to the high-impedance output
state.

All counters are loaded with a nonterminal count value.

For additional details concerning the Am9513A Counter/Timer, see
Appendix C, AMD Am9513A Data Sheet.