
ADC10_B Operation
16.2.11.2 ADC10_B Interrupt Handling Software Example
The following software example shows the recommended use of the
. The ADC10IV value is
added to the PC to automatically jump to the appropriate routine.
•
ADC10IFG0, ADC10TOV, and ADC10OV: 16 cycles
; Interrupt handler for ADC10_B.
INT_ADC10_B
; Enter Interrupt Service Routine
ADD
&ADC10IV,PC
; Add offset to PC
RETI
; Vector
0: No Interrupt
JMP
ADOV
; Vector
2: ADC10_B overflow
JMP
ADTOV
; Vector
4: ADC10_B timing overflow
JMP
ADHI
; Vector
6: ADC10_B window comparator high
Interrupt
JMP
ADLO
; Vector
8: ADC10_B window comparator low
Interrupt
JMP
ADIN
; Vector 10: ADC10_B window comparator in
Interrupt
;
; Handler for ADC10IFG0 starts here. No JMP required.
;
ADMEM
MOV &ADC10MEM0,xxx
; Move result, flag is reset
...
; Other instruction needed?
RETI
; Return ;
ADOV
...
; Handle ADCMEM0 overflow
RETI
; Return ;
ADTOV
...
; Handle Conv. time overflow
RETI
; Return ;
ADHI
...
; Handle window comparator high Interrupt
RETI
; Return ;
ADLO
...
; Handle window comparator low Interrupt
RETI
; Return ;
ADIN
...
; Handle window comparator in window Interrupt
RETI
; Return
448
ADC10_B Module
SLAU272C – May 2011 – Revised November 2013
Copyright © 2011–2013, Texas Instruments Incorporated