160
2. APPLICAT ION
MITSUBISHI MICROCOMPUTER
3819 Group
2.9 Clock generating circuit
3819 Group USER’S MANUAL
2.9.2 Clock generating circuit application examples
(1) Status transition upon a power failure
Outline :
The clock is counted up every second by
using the timer interrupt during a power
failure.
Specifications :
Keep a power consumption as low as possible
while maintaining a clock function.
f(X
IN
) = 4.19 MHz, f(X
CIN
) = 32.768 kHz
Port processing
Input port : Fix to “H” or “L” level in the external
unit.
Output port : Fix to an output level which does not
cause a current flow to the external
unit.
[
Example
]
When a circuit turns on LED at “L” output level, fix the output level to “H.”
Fig. 2.9.10 Connection diagram
[Status transition upon a power failure]
I/O port : Input port — Fix to “H” or “L” level in the external unit .
Output port — Output the data which does not consume current.
V
REF
: Supplying to the Reference voltage input pin is stopped by the external circuit.
P4
5
/ZCR (using as the input port) : Fix to “H” level in the external unit .
Figure 2.9.11 shows a status transition diagram upon a power failure, Figure 2.9.12 shows a setting of related
registers, and Figure 2.9.13 shows a control procedure.
Fig. 2.9.11 Status transition diagram upon a power failure
Input port
(
Note
)
3819 group
Power failure detection signal
Signal is detected by inputting
to each input port, interrupt
input pin, and analog input pin.
Note :
X
IN
X
CIN
Internal system
clock
f(X
IN
)/2
f(X
CIN
)/2
Change the internal
system clock to f(X
IN
)/2
(high-speed mode).
After detecting a power
failure, change the internal
system clock to f(X
CIN
) and
stop operating of f(X
IN
).
f(X
IN
)/8
Release reset
Detection of power failure
Selection of X
CIN
oscillating function