Using the Analog to Digital Converter (ADC) for the QE Microcontrollers
QE128 Quick Reference User Guide, Rev. 1.0
8-4
Freescale Semiconductor
// please make sure that you never leave this function
}
NOTE
This is the analog-to-digital converter interrupt service routine. Every time
an interrupt is detected, this routine displays the converted value in PTE
port. The VectorNumber_Vadc can be replaced by the interrupt vector
number, this depends if the MCU is S08 or V1. Using this example makes
the code fully compatible for either MCU.
void interrupt VectorNumber_Vadc ADC_ISR(void) {
// ADC vector address = 19 (S08)
// ADC vector address = 81 (V1)
PTED = ADCRL; // Move the adquired ADC value to PTE port
}
8.2.2
Hardware Implementation
Figure 8-1. ADC Hardware Implementation.