English
Language : 

W79E201 Datasheet, PDF (50/87 Pages) Winbond – 8-BIT MICROCONTROLLER
W79E201
Clock Control
WD1, WD0: CKCON.7, CKCON.6 - Watchdog Timer Mode select bits. These two bits select the time-
out interval for the watchdog timer. The reset time is 512 clocks longer than the interrupt
time-out value.
The default Watchdog time-out is 217 clocks, which is the shortest time-out period. The EWT, WDIF
and RWT bits are protected by the Timed Access procedure. This prevents software from accidentally
enabling or disabling the watchdog timer. More importantly, it makes it highly improbable that errant
code can enable or disable the watchdog timer. Please refer as below demo program.
org 63h
mov TA,#AAH
mov TA,#55H
clr WDIF
jnb execute_reset_flag,bypass_reset
jmp $
bypass_reset:
mov TA,#AAH
mov TA,#55H
setb RWT
reti
; Test if CPU need to reset.
; Wait to reset
org
start:
mov
;
mov
;
mov
;
mov
mov
mov
mov
setb
setb
jmp
300h
ckcon,#01h ; select 2 ^ 17 timer
ckcon,#61h ; select 2 ^ 20 timer
ckcon,#81h ; select 2 ^ 23 timer
ckcon,#c1h ; select 2 ^ 26 timer
TA,#aah
TA,#55h
WDCON,#00000011B
EWDI
ea
$
; wait time out
- 50 -