English
Language : 

HD404054 Datasheet, PDF (77/101 Pages) Hitachi Semiconductor – HMCS400-series microcomputers designed to increase program productivity with large-capacity memory
HD404054 Series/HD404094 Series
Compare Enable Register (CER: $018): Three-bit write-only register which enables comparator
operation, and selects the reference voltage and the analog input pin (figure 61).
Compare enable register (CER: $018)
Bit
Initial value
Read/Write
Bit name
3
0
W
CER3
2
1
—
0
—
W
Not used CER1
0
0
W
CER0
CER3
0
1
Digital/Analog selection
Digital input mode:
RD0 /COMP0, RD1 /COMP1
operate as R port
Analog input mode:
RD0 /COMP0, RD1 /COMP1
operate as analog input
CER1
0
1
CER0 Analog input pin selection
0 COMP0
1 COMP1
0 Not used
1 Not used
Figure 61 Compare Enable Register
Compare Data Register (CDR: $017): Two-bit read-only register which latches the result of the
comparison between the analog input pins and the reference voltage. Bits 0 and 1 corresponds the results
of comparison with COMP0 and COMP1, respectively. This register can be read only by the TM or TMD
command. Only bit CER3 corresponds to the analog input pin which the input pin selection is made
through pins CER0 and CER1. After a compare operation, the data in this register is not retained (figure
62).
Compare data register (CDR: $017)
Bit
Initial value
Read/Write
Bit name
3
2
1
0
—
— Undefined Undefined
—
—
R
R
Not used Not used CDR1 CDR0
Result of COMP0 comparison
Result of COMP1 comparison
Figure 62 Compare Data Register
Note on Use: During the compare operation pins RD0/COMP0 and RD1/COMP1 operate as analog inputs
and cannot operate as R ports.
The comparator can operate in active mode but is disabled in other modes.
RE0/VCref cannot operate as an R port when the external input voltage is selected as the reference.
77