300
CHAPTER 13 COMPARATOR
Voltage comparator
The voltage comparator uses the RH and RL pins, as reference voltage input pins for the
reference voltage switching units. This implements a comparator with RH-RL hysteresis
width.
Battery monitoring circuit
The battery monitoring circuit monitors power supplied from the AC adapter and the
intermittent interruption of power (VOL), voltage level (VSI), and mount/dismount of batteries.
When battery discharge starts, the battery monitoring circuit automatically generates an
approximately 250
μ
s to 500
μ
s of delay from change of VOL by the subclock.
Battery selection circuit
The battery selection circuit controls the selection of a battery discharge method and the
order of discharge, based on the values set in the COCR register 1 (COCR1:SPM0, 1, 2).
Comparator control register 1 (COCR1)
This register is used to set a sequence for the battery selection circuit and to disable battery
discharge.
Comparator control register 2 (COCR2)
This register is used to allow operation of the comparator and control output from ports.
Comparator status register 1 (COSR1)
This register holds and stores an edge change in signals that are output from comparator 1
and voltage comparators 2 to 8. This allows confirmation of a battery voltage change.
Comparator interrupt control register 1 (CICR1)
When an edge change is detected in an output signal by the COSR1 register, this register
allows an interrupt to be generated.
Comparator status register 2 (COSR2)
This register holds and stores output from comparators 2 to 4 and an edge change in a
VALID signal from the battery monitoring circuit. This allows the detection of mounting/
dismounting of batteries and the status changes of batteries.
Comparator interrupt control register 2 (CICR2)
The CICR2 controls enabling an interrupt when the outputs from comparators 2 to 4 together
with the change of edges of VALID signal from the battery monitoring circuit are seized by
the COSR2 register.
Comparator status register 3 (COSR3)
This register stores a VALID signal value that is output from the battery monitoring circuit .
This allows a VALID signal output value to be confirmed.
Comparator status register 4 (COSR4)
This register can directly read values that are output from comparator 1 and voltage
comparators 2 to 8.