S1C63666 TECHNICAL MANUAL
EPSON
123
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (Analog Comparator)
4.16.3 I/O memory of analog comparator
Table 4.16.3.1 shows the I/O address and control bits for the analog comparator.
Table 4.16.3.1 Control bits of analog comparator
Address
Comment
D3
D2
Register
D1
D0
Name
Init
∗
1
1
0
FF05H
CMPON CMPDT SVDDT SVDON
R/W
R/W
R
CMPON
CMPDT
SVDDT
SVDON
0
0
0
0
On
+ > -
Low
On
Off
+ < -
Normal
Off
Analog comparator On/Off
Analog comparator data
SVD evaluation data
SVD circuit On/Off
*1 Initial value at initial reset
*2 Not set in the circuit
*3 Constantly "0" when being read
CMPON: Analog comparator control (on/off) register (FF05H•D3)
Controls the analog comparator on and off.
When "1" is written: On
When "0" is written: Off
Reading: Valid
The analog comparator goes on by writing "1" to CMPON and goes off when "0" is written.
At initial reset, this register is set "0".
CMPDT: analog comparator data (FF05H•D2)
The comparison result of the analog comparator can be read out.
When "1" is read: CMPP0 (+) > CMPM0 (-)
When "0" is read: CMPP0 (+) < CMPM0 (-)
Writing: Invalid
The result of analog comparator can be read from CMPDT. When the status of external voltage input to
differential input terminals CMPP0 and CMPM0 is CMPP0 (+) > CMPM0 (-), CMPDT becomes "1" and
when it is CMPP0 (+) < CMPM0 (-), CMPDT becomes "0".
When the analog comparator is off, the latched result immediately prior to going off is read out.
At initial reset, this bit is set to "0".
4.16.4 Programming notes
(1) To reduce current consumption, turn the analog comparator off (CMPON = "0") when it is not neces-
sary.
(2) After the analog comparator is turned on, a maximum of 3 msec is necessary until the output stabi-
lizes. Consequently, allow an adequate waiting time after turning the analog comparator on, before
reading the comparison result.