SN8P2714X_2715
8-bit micro-controller build-in 12-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 57
V1.4
8
TIMERS COUNTERS
8.1 WATCHDOG TIMER (WDT)
This built-in WDT watchdog 4-bit binary up counter designed for monitoring program execution. If the program is
operated into the unknown status by noise interference or program dead lock, WDT’s overflow signal will reset this chip
to restart operation. In normal operation flow, the user must clear watchdog timer before overflow occurs to prevent the
program from unexpected system reset. The clock source of watchdog timer (WDT) always comes from internal low
speed RC oscillator. The overflow time of WDT is about:
1 / ( 16K
÷
512
÷
16 ) ~ 0.5s
@ 3V
1 / ( 32K
÷
512
÷
16 ) ~ 0.25s @ 5V
0CCH
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
WDTR
WDTR7 WDTR6 WDTR5 WDTR4 WDTR3 WDTR2 WDTR1 WDTR0
Read/Write R/W
R/W
R/W
R/W R/W R/W R/W R/W
After
reset
- - - - - - - -
Write WDTR with “0x5A” to clear the Watchdog Timer.
Note:
¾
The watchdog timer can be set “Always_ON”,”Enable” and “Disabled” at the code option.
¾
Watch_Dog code option = “Enable”
Stop in power down (sleep) mode.
Enable in normal mode.
¾
Watch_Dog code option = “Always_ON”.
Enable in normal mode and power down (sleep) mode.
Â
Example: An operation of watchdog timer is as following. To clear the watchdog timer counter in the top
of the main routine of the program.
Main:
MOV
A,#0x5A
MOV
WDTR,A
; Clear the watchdog timer counter.
. .
CALL
SUB1
CALL
SUB2
. .
. .
. .
JMP
MAIN