English
Language : 

PD17012_15 Datasheet, PDF (126/320 Pages) Renesas Technology Corp – 4-BIT SINGLE-CHIP MICROCONTROLLERS WITH DIGITAL TUNING SYSTEM HARDWARE
µPD17012, 17P012
Example
Example of correcting timer at CE reset (to detect power failure and update watch timer using
BTM0CY flag)
START:
Processing A
; <1>
SKT1 BTM0CY
BR
BACKUP:
; <2>
INITIAL
100 ms watch updating
; Program address 0000H
; Embedded macro
; Tests BTM0CY flag
; if “0”, branches to INITIAL (power failure detection)
; Corrects watch timer because of backup (CE reset)
LOOP:
; <3>
Processing B
: While performing processing B,
SKF1
BR
BR
INITIAL:
CLR2
BTM0CY
BACKUP
LOOP
; tests BTM0CY flag and updates watch timer
BTM0CK1, BTM0CK0
; Embedded macro
; Because power failure (power-on reset) occurs,
; sets setting time of BTM0CY flag to 100 ms, and
; executes processing C
Processing C
BR LOOP
Figure 12-9 shows the timing chart of the above program.
124
Data Sheet U10101EJ4V0DS