Chapter 4
Programming
© National Instruments Corporation
4-45
AT-DIO-32F User Manual
Table 4-3. Interrupt Condition and Status
Interrupt Enable Bit
Status Bit in the
Type of Interrupt
To Clear the
in the CFG Register
STAT Register
Status Bit
INTEN1
DRDY1
Data ready of Group 1
Read/write data
INTEN2
DRDY2
Data ready of Group 2
Read/write data
TCINTEN1
DMATC1
DMA terminal count of
Write to DMACLR1
Group 1
Register
TCINTEN2
DMATC2
DMA terminal count of
Write to DMACLR2
Group 2
Register
CNTINTEN
CNTINT
Counter 3 interrupt
Write to CNTINTCLR
Register
Note: Counter 3 interrupts use the interrupt line for Group 2.
Example: Interrupt Generation on DRDY1
Instead of polling the DRDY1 bit, interrupts can be used to wait for the DRDY1 condition. The
interrupt service routine can then write or read the data to or from Group 1. To use interrupts for
this task, follow these steps:
1. Set up Group 1 with the desired handshaking mode and direction.
2. Set the INTEN1 bit in the CFG1 Register to enable interrupts on DRDY1.
3. When DRDY1 is set, an interrupt request is asserted and software control enters the interrupt
service routine.
In the interrupt service routine, follow these steps:
a. Check the DRDY1 bit in the STAT Register to verify that the current interrupt was
generated by a DRDY1 condition.
b. Write or read data to or from Group 1.
When DRDY1 becomes set again, software control again jumps to the interrupt service
routine.
Содержание AT-DIO-32F
Страница 19: ......
Страница 101: ......
Страница 102: ......
Страница 123: ......
Страница 124: ......
Страница 125: ......
Страница 126: ......
Страница 127: ......
Страница 128: ......
Страница 129: ......
Страница 130: ......
Страница 131: ......
Страница 132: ......
Страница 133: ......
Страница 134: ......
Страница 135: ......
Страница 136: ......
Страница 137: ......
Страница 138: ......
Страница 139: ......
Страница 140: ......
Страница 141: ......
Страница 142: ......
Страница 143: ......