Datasheet

613
32133D–11/2011
UC3D
28.6.16 Window monitor
The window monitor monitors ADC results and make the ADCIFD behave as an analog compar-
ator. Configuration is done by writing appropriately the Window Configuration Register (WCFG)
and the Window Thresholds Register (WTH). When writing a one in the Monitor Filter Mode bit in
the WCFG register (WCFG.MFM) , conversions are filtered using its index in the sequence. Oth-
erwise, no filtering is applied, monitoring is performed on every conversion. Index is given by
writing the field Source in the WCFG register (WCFG.SRC). Supported modes are selected by
writing the Window Mode field in the WCFG register, please refer to the Table 28-2 below.
Thresholds are given by writing the Low Threshold (LT) and High Threshold (HT) in WTH.
Please note that the significant WTH.LT and WT.HT bits are given by the precision selected in
the SEQCFG.SRES field. That means that if you are in 8-bit mode, only the 8 lower bits will be
considered.
Note: Comparisons are performed regardless with the SEQCFG.HWLA setting (half word left
adjust).
28.6.17 Interrupts
Interrupt requests are enabled by writing a one to the corresponding bit in the Interrupt Enable
Register (IER) and disabled by writing a one to the corresponding bit in the Interrupt Disable
Register (IDR). Enabled interrupts can be read from the Interrupt Mask Register (IMR). Active
interrupt requests, but potentially masked, are visible in the Status Register (SR). To clear an
active interrupt request, write a one to the corresponding bit in the Clear Register (CR).
The Status Register (SR) fields in common with IER/IDR/IMR show the status since the last
write to the Interrupt Clear Register. Other SR fields show the status at the time being read.
Table 28-2. Window Monitor Modes
WM field in WCFGy
Modes
0 0 0 No window mode (default)
0 0 1 Mode 1 : active when result > LT
0 1 0 Mode 2 : active when result < HT
0 1 1 Mode 3 : active when LT < result < HT
1 0 0 Mode 4 : active when (!(LT < result < HT))
1 0 1 reserved
1 1 0 reserved
1 1 1 reserved