Atmel SAM4L Xplained Pro Evaluation Kit Atmel ATSAM4L-XPRO ATSAM4L-XPRO Data Sheet

Product codes
ATSAM4L-XPRO
Page of 1204
975
42023E–SAM–07/2013
ATSAM4L8/L4/L2
Figure 37-2. Analog Comparator Interface in Window mode
37.6.5.1
Window Mode Output 
When operating in window mode, each AC generates the same ACOUT outputs as in normal
mode, see 
.
Additionally, the ACIFC generates a window mode signal (ACWOUT) according to the common
input voltage to be compared:
• ACWOUT = 1 if the common input voltage is inside the window, V
ACBNx+1
 < V
common
 < V
ACAPx
• ACWOUT = 0 if the common input voltage is outside the window, V
common
 < V
ACANx+1
 or 
V
common
 > V
ACAPx
• ACWOUT = 0 if the window mode output is not available (SR.ACRDYx=0 or 
SR.ACRDYx+1=0)
The Windowx Mode Current Status bit in SR (SR.WFCSx) gives the comparison status of the
window pair.
37.6.5.2
Window Mode Interrupts
When operating in window mode, each AC can generate the same interrupt as in normal mode,
see 
Additionally, when ACs operate in window mode, a third type of interrupt based on ACWOUT
can be generated (bit ISR.WFINTx).
Writing to Window Mode Interrupt Settings in Windowx Mode Configuration Register (CON-
FWx.WIS) selects an interrupt source:
• As soon as the common input voltage is inside the window.
• As soon as the common input voltage is outside the window.
Comparator pair
-
+
ACx
Interrupt 
Generator
Window 
Module
ACOUTx
Peripheral Event 
Generator 
Window
WINDOW MODE 
PERIPHERAL 
EVENT
-
+
ACx+1
SR
.A
CC
Sn
SR
.W
FCS
n
ACAPx
ACANx
ACBPx
COMMON
ACWOUT
ACBNx
IRQ
ACOUTx+1
CONFx.INSELN
CONFx+1.INSELN