C8051F300/1/2/3/4/5
46
Rev. 2.9
5.4.2. Window Detector In Differential Mode
Figure 5.7 shows two example window comparisons for differential mode, with ADC0LT = 0x10 (+16d) and
ADC0GT = 0xFF (–1d). Notice that in Differential mode, the codes vary from –VREF to VREF x (127/128)
and are represented as 8-bit 2’s complement signed integers. In the left example, an AD0WINT interrupt
will be generated if the ADC0 conversion word (ADC0L) is within the range defined by ADC0GT and
ADC0LT (if 0xFF (–1d) < ADC0 < 0x10 (16d)). In the right example, an AD0WINT interrupt will be gener-
ated if ADC0 is outside of the range defined by ADC0GT and ADC0LT (if ADC0 < 0xFF (–1d) or ADC0 >
0x10 (+16d)).
Figure 5.7. ADC Window Compare Examples, Differential Mode
SFR Definition 5.5. ADC0GT: ADC0 Greater-Than Data Byte (C8051F300/2)
SFR Definition 5.6. ADC0LT: ADC0 Less-Than Data Byte (C8051F300/2)
0x7F (127d)
0x11 (17d)
0x10 (16d)
0x0F (15d)
0x00 (0d)
0xFF (-1d)
0xFE (-2d)
0x80 (-128d)
-REF
Input Voltage
(P0.x - P0.y)
REF x (127/128)
REF x (16/128)
REF x (-1/256)
0x7F (127d)
0x11 (17d)
0x10 (16d)
0x0F (15d)
0x00 (0d)
0xFF (-1d)
0xFE (-2d)
0x80 (-128d)
-REF
Input Voltage
(P0.x - P0.y)
REF x (127/128)
REF x (16/128)
REF x (-1/256)
AD0WINT=1
AD0WINT
not affected
AD0WINT
not affected
ADC0LT
ADC0GT
AD0WINT
not affected
ADC0GT
ADC0LT
AD0WINT=1
AD0WINT=1
ADC0
ADC0
Bits7–0: ADC0 Greater-Than Data Word.
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset Value
11111111
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
SFR Address:
0xC4
Bits7–0: ADC0 Less-Than Data Word.
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset Value
00000000
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
SFR Address:
0xC6
Summary of Contents for C8051F300
Page 2: ...C8051F300 1 2 3 4 5 2 Rev 2 9 NOTES ...
Page 6: ...C8051F300 1 2 3 4 5 6 Rev 2 9 NOTES ...
Page 48: ...C8051F300 1 2 3 4 5 48 Rev 2 9 NOTES ...
Page 56: ...C8051F300 1 2 3 4 5 56 Rev 2 9 NOTES ...
Page 82: ...C8051F300 1 2 3 4 5 82 Rev 2 9 NOTES ...
Page 88: ...C8051F300 1 2 3 4 5 88 Rev 2 9 NOTES ...
Page 96: ...C8051F300 1 2 3 4 5 96 Rev 2 9 NOTES ...
Page 130: ...C8051F300 1 2 3 4 5 130 Rev 2 9 NOTES ...
Page 172: ...C8051F300 1 2 3 4 5 172 Rev 2 9 NOTES ...