
R8C/3JM Group
6. Voltage Detection Circuit
R01UH0285EJ0100 Rev.1.00
Aug 08, 2011
6.5
Voltage Monitor 1 Interrupt
To use the voltage monitor 1 interrupt to exit stop mode, set the VW1C1 bit in the VW1C register to 1 (digital filter
disabled).
Notes:
1. When the VW1C0 bit is set to 0, steps 2, 3 and 4 can be executed simultaneously (with one
instruction).
2. When the VW1C0 bit is set to 0, steps 6 and 7 can be executed simultaneously (with one instruction).
3. When the VW1C0 bit is set to 0, steps 8 and 9 can be executed simultaneously (with one instruction).
4. When the voltage detection 1 circuit is enabled while the voltage monitor 1 interrupt is disabled, low
voltage is detected and the VW1C2 bit becomes 1.
When low voltage is detected after the voltage detection 1 circuit is enabled until an interrupt is
enabled for the setting procedure of bits associated with voltage monitor 1 interrupt, an interrupt is
not generated. After an interrupt is enabled, read the VW1C2 bit. When the bit is read as 1, perform
the process that occurs when low voltage is detected.
Table 6.3
Procedure for Setting Bits Associated with Voltage Monitor 1 Interrupt
Step
When Using Digital Filter
When Using No Digital Filter
1
Select the voltage detection 1 detection voltage by bits VD1S3 to VD1S0 in the VD1LS
register.
2
Set the VCA21 bit in the VCA2 register to 0 (internal reference voltage).
Set the VCA22 bit in the VCA2 register to 0 (VCC voltage).
Set the VCA26 bit in the VCA2 register to 1 (voltage detection 1 circuit enabled).
5
Wait for td(E-A).
6
Set the COMPSEL bit in the CMPA register to 1.
Select the interrupt type by the IRQ1SEL in the CMPA register.
8
Select the sampling clock of the digital filter by
bits VW1F0 and VW1F1 in the VW1C register.
Set the VW1C1 bit in the VW1C register to 1
(digital filter disabled).
Set the VW1C1 bit in the VW1C register to 0
(digital filter enabled).
10
Select the interrupt request timing by the VCAC1 bit in the VCAC register and the VW1C7 bit
in the VW1C register.
11
Set the VW1C2 bit in the VW1C register to 0.
12
Set the CM14 bit in the CM1 register to 0
(low-speed on-chip oscillator on)
13
Wait for 2 cycles of the sampling clock of
the digital filter
(No wait time required)
Set the VW1C0 bit in the VW1C register to 1 (voltage monitor 1 interrupt enabled)