Chapter 4
Programming
4-56
©
National Instruments Corporation
Writing to Serial CALDAC11
CALDAC11=0x80;
Writing to Serial CALDAC0
CALDAC0 = 0x80;
Writing to Serial CALDAC12
CALDAC12=0xao;
7.
Perform Steps 9 and 10 in
Example 2.
8.
Poll the AIFIFO not empty flag in the AI_Status_Register until
not empty, then read the data in the ADC_FIFO_Data_Register.
Do{
If (AIFIFO not empty) then
read FIFO data;
}while (100 samples have not been read)
Interrupt Programming
Chapter 8, Interrupt Control, in the DAQ-STC Technical Reference
Manual, discusses the interrupt programming aspect of the PCI E Series
boards.
There are two groups—Interrupt Group A and Interrupt Group B. Group A
handles the analog input interrupts, general-purpose Counter 0 interrupts,
and one pass-through interrupt. The Group A pass-through interrupt is not
used. Group B handles the analog output interrupts, general purpose
counter 1 interrupts, and one pass-through interrupt. The Group B
pass-through interrupt is not used.
The
MSC_IRQ_Configure
function, found in the DAQ-STC Technical
Reference Manual, should select the IRQ_OUT0 line for Group A and for
Group B. The MITE maps these interrupts to the INTA line on the PCI bus.
The Interrupt Control section also describes two interrupt programs, one
for Group A and one for Group B, which are skeletons of the actual
interrupt service routines. These programs do not address the programming
of the interrupt controller.
Interrupt Sharing
It is possible for multiple PCI boards to share the same interrupt. In this
case the interrupt service routine (ISR) must be daisy-chained such that