NEC PD17062 User Manual
Page 188

188
µ
PD17062
Example
Sample program
START:
; Program address 0000H
;
#
Reset processing
;
;
$
SKT1
BTM0CY
; Power failure detection
BR
INITIAL
BACKUP:
;
%
Clock updating
BR
MAIN
INITIAL:
;
&
Initialization
;
(
INITFLG NOT BTM0ZX, NOT BTM0CK2, NOT BTM0CK1, BTM0CK0
; Built-in macro
; Sets timer carry FF set time to 5 ms.
MAIN:
SKT1
BTM0CY
BR
MAIN
Clock updating
Operation example
5 V
0 V
V
DD
CE
Timer carry FF
set pulse
#
50 ms
50 ms
$ Power failure detection
&
#
%
$ Power failure
detection
CE reset
CE reset
When the processing time
of
# + % is too long, a
CE reset is applied.
When the processing time
of
# + & is 100 ms or longer,
a CE reset is applied midway
through processing
&.
(
CE reset may be applied immediately, depending on the timer carry
FF set time switching timing. When
( is executed before &,
power failure processing
& may not be executed.