Samsung S3F80JB Manuel D’Utilisation

Page de 346
S3F80JB 
 
COMPARATOR 
 
14-1 
14
 
COMPARATOR 
OVERVIEW 
P2.4, P2.5, P2.6 and P2.7 can be used as analog input pins for a comparator. The reference voltage for the 4-
channel comparator can be supplied either internally or externally at P2.7. When an internal reference voltage is 
used, four channels (P2.4–P2.7) are used for analog inputs and the internal reference voltage is varied in 16 
levels.  If an external reference voltage is input at P2.7, the other P2.4, P2.5 and 2.6 pins are used for analog 
inputs. 
When a conversion is completed, the result is saved in the comparison result register CMPREG (EAH, Set1, 
Bank1, Read-only). The initial values of the CMPREG are undefined and the comparator operation is disabled by 
a reset. The comparator module has the following components: 
— Comparator 
—  Internal reference voltage generator (4-bit resolution) 
—  External reference voltage source at P2.7 
—  Comparator mode register (CMOD) 
—  Comparison result register (CMPREG) 
—  Comparison input selection register (CMPSEL)