English
Language : 

HD404639R Datasheet, PDF (106/135 Pages) Renesas Technology Corp – 4-Bit Single-Chip Microcomputer
HD404639R Series
Comparator
The block diagram of the comparator is shown in figure 89. The comparator compares input voltage with
the reference voltage. Internal voltage or external input voltage can be selected as the reference. Internal
reference voltage is selected from sixteen levels.
Setting bit 3 (CER3) of the compare enable register (CER: $018) to 1 executes a voltage comparison.
When an input voltage at COMP0–COMP3 is higher than the reference voltage, the TM or TMD command
sets the status flag (ST) high for the corresponding bits of the compare data register (CDR: $017) to
COMP0–COMP3. On the other hand, when an input voltage at COMP0–COMP3 is lower, the TM or TMD
command clears the ST to 0.
COMP0
COMP1
COMP2
COMP3
VCref
+
Com-
parator
–
Comparator data
register (CDR)
2
5R
Comparator enable
R
register (CER)
R
R
2R
4
Comparator control
register (CCR)
Figure 89 Block Diagram of Comparator
Compare Enable Register (CER: $018): Four-bit write-only register which enables comparator
operation, and selects the reference voltage and the analog input pin.
Compare Control Register (CCR: $016): Four-bit write-only register which selects the internal reference
voltage from sixteen levels.
Compare Data Register (CDR: $017): Four-bit read-only register which latches the result of the
comparison between the analog input pins and the reference voltage. Bits 0 to 3 show the results of
comparison with COMP0–COMP3, respectively. This register can be read only by the TM or TMD
104