II-24
EPSON
S1C6S3N2 TECHNICAL SOFTWARE
CHAPTER 5: PERIPHERAL CIRCUITS (Watchdog Timer)
XTISF
EQU
0001B
;
YFTM
EQU
◆ ◆
◆ ◆
H
;
;
;
TI2:
LD
X,YFTM
;
FAN
aMX,XTISF
;
JP
NZ,TI21
;
;
OR
MX,XTISF
;
LD
X,7FH
;
LD
MX,0001B
;
RET
;
TI21:
AND
MX,XTISF XOR 0FH ;
CALL
CK
;
;
RET
;
The address for the timing flag set FTM can be set anywhere
in RAM.
Further, this routine assumes that a timer subroutine has
been prepared separately to make 1 second the unit for the
routine "basic timer 'CK'".
(See page 63, "Example of using timer interrupt" for how to
make "basic timer 'CK'".)
When the watchdog timer is used for the reset function, the
software must reset the watchdog timer within 3 seconds.
In this case, timer data (WD0–WD2) cannot be used for
timer applications.
0.5-sec flag (TISF)
Address for timing flag set
TISF = "0" or "1"?
TISF = "0": Set the TIS flag
Reset the watchdog timer
Returns to parent routine
TISF = "1": Reset the TIS flag
Execute the basic timer "CK"
Returns to parent routine
Program
Programming note
Summary of Contents for S1C6S3N2
Page 4: ......
Page 6: ......
Page 7: ...Hardware Hardware S1C6S3N2 I Technical Hardware ...
Page 8: ......
Page 141: ...Software Software S1C6S3N2 II Technical Software ...
Page 142: ......
Page 146: ......