datasheetbank_Logo
数据手册搜索引擎和 Datasheet免费下载 PDF

C8051T603-GS(2007) 查看數據表(PDF) - Silicon Laboratories

零件编号
产品描述 (功能)
生产厂家
C8051T603-GS
(Rev.:2007)
Silabs
Silicon Laboratories 
C8051T603-GS Datasheet PDF : 168 Pages
First Prev 41 42 43 44 45 46 47 48 49 50 Next Last
C8051T600/1/2/3/4/5
5.7. Programmable Window Detector
The ADC Programmable Window Detector continuously compares the ADC0 output to user-programmed
limits, and notifies the system when a desired condition is detected. This is especially effective in an inter-
rupt-driven system, saving code space and CPU bandwidth while delivering faster system response times.
The window detector interrupt flag (AD0WINT in register ADC0CN) can also be used in polled mode. The
ADC0 Greater-Than (ADC0GTH, ADC0GTL) and Less-Than (ADC0LTH, ADC0LTL) registers hold the
comparison values. Example comparisons are shown in Figure 5.6. Notice that the window detector flag
can be programmed to indicate when measured data is inside or outside of the user-programmed limits
depending on the contents of the ADC0LTH:L and ADC0GTH:L registers.
5.7.1. Window Detector Example
Figure 5.6 shows two example window comparisons, using the ADC in 10-bit 1x gain mode. The ADC out-
put codes represent input voltages (AIN – GND) from 0 V to VREF x (1023/1024) and are represented as
10-bit unsigned integers. Note that the hexadecimal numbers shown are left-justified, 10-bit values. In the
example on the left-hand side, an AD0WINT interrupt will be generated if the ADC0 conversion word
(ADC0H:L) is within the range defined by ADC0GTH:L and ADC0LTH:L (if 0x1000 < ADC0H:L < 0x2000).
In the example on the right-hand side, an AD0WINT interrupt will be generated if ADC0 is outside of the
range defined by ADC0GTH:L and ADC0LTH:L (if ADC0H:L < 0x1000 or ADC0H:L > 0x2000).
Input Voltage
(AIN+ - GND)
REF x (1023/1204)
ADC0H:L
0xFFC0
REF x (1/8)
REF x (1/16)
0x2040
0x2000
0x1FC0
0x1040
0x1000
0x0FC0
AD0WINT
not affected
Input Voltage
(AIN+ - GND)
REF x (1023/1024)
ADC0H:L
0xFFC0
ADC0LTH:L
AD0WINT=1
ADC0GTH:L
REF x (1/8)
REF x (1/16)
0x2040
0x2000
0x1FC0
0x1040
0x1000
0x0FC0
0
0x0000
AD0WINT
not affected
0
0x0000
Figure 5.6. ADC Window Compare Examples
AD0WINT=1
ADC0GTH:L
AD0WINT
not affected
ADC0LTH:L
AD0WINT=1
42
Rev. 0.5

Share Link: 

datasheetbank.com [ Privacy Policy ] [ Request Datasheet ] [ Contact Us ]