26.2.6 ADC Window Detect
The MG82F6D17 ADC's programmable window detector continuously compares the ADC output
registers with
user-programmed limits, and notifies the system when a desired condition is detected. This is especially
effective in an interrupt driven system, saving code space and CPU bandwidth while delivering faster
response times. The window detector interrupt flag (ADCWI) can also be used in polled mode. The
Window-High-Boundary (WHB[11:0] , {ADCFG12, ADCFG11}) and Window-Low-Boundary (WLB[11:0],
{ADCFG14, ADCFG13}) registers hold the boundary values. The Window-Boundary flags can be
programmed to catch the ADC convert value (ADCDH:ADCDL) when it is inside or outside of the user-defined
boundary. The following figure shows the two window detect modes:
1. ADWM0 = 0: When ADC convert value is "inside" the boundary the interrupt flag ADCWI will be
held. Which means the condition WLB[11:0] ≤ ADCDH:ADCDL ≤ WHB[11:0] is true, ADCWI will be
held.
2. ADWM0 = 1: When ADC convert value is "outside" the boundary the interrupt flag ADCWI will be
held. Which means the condition WLB[11:0] > ADCDH:ADCDL or ADCDH:ADCDL< WHB[11:0] is true,
ADCWI will be held.
Figure 26–3. ADC Conversion Timing
Figure 26–4. ADC Window Detect
Rev0.1 | 285/347
CMT2380F17
www.cmostek.com
Need help?
Do you have a question about the CMT2380F17 and is the answer not in the manual?
Questions and answers