SN8P1829
8-Bit MCU build-in 12-bit ADC + PGIA + Charge-pump Reg 128 dots LCD driver
SONiX TECHNOLOGY CO., LTD
Page 53
Version 1.0
8
8
8
TIMERS COUNTERS
WATCHDOG TIMER (WDT)
The watchdog timer (WDT) is a binary up counter designed for monitoring program execution. If the program runs into
the unknown status by noise interference, WDT overflow signal will reset this chip and restart operation. The instruction
that clears the watchdog timer (B0BSET FWDRST) should be executed at proper points in a program within a given
period. If an instruction that clears the watchdog timer is not executed within the period and the watchdog timer
overflows, reset signal is generated and system is restarted with reset status. In order to generate different output
timings, the user can control watchdog timer by modifying WDRATE control bit of OSCM register. The watchdog timer
will be disabled at green and power down modes.
OSCM initial value = 0000 000x
0CAH
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
OSCM
WTCKS WDRST WDRATE
CPUM1 CPUM0 CLKMD STPHX
-
R/W R/W R/W R/W R/W R/W R/W -
Bit1
STPHX:
External high-speed oscillator control bit.
0 = free run,
1 = stop.
Note: This bit only controls external high-speed oscillator. If STPHX=1, the internal low-speed RC
oscillator is still running.
Bit2
CLKMD:
System high/Low speed mode select bit.
0 = normal (dual) mode,
1 = slow mode.
Bit [4:3]
CPUM [1:0]
: CPU operating mode control bit.
00 = normal,
01 = sleep (power down) mode,
10 = green mode,
11 = reserved.
Bit5
WDRATE:
Watchdog timer rate select bit.
0 = F
CPU
÷
2
14
1 = F
CPU
÷
2
8
Bit6
WDRST:
Watchdog timer reset bit.
0 = No reset
1 = clear the watchdog timer’s counter.
(The detail information is in watchdog timer chapter.)
Bit7
WTCKS:
Watchdog clock source select bit.
0 = F
CPU
1 = internal RC low clock.
WTCKS WTRATE
CLKMD
Watchdog Timer Overflow Time
0 0 0
1 / (F
CPU
÷
2
14
÷
16) = 293 ms, F
OSC
=3.58MHz
0 1 0
1 / (F
CPU
÷
2
8
÷
16) = 500 ms, F
OSC
=32768Hz
0 0 1
1 / (F
CPU
÷
2
14
÷
16) = 32s, F
OSC
=32768Hz
0 1 1
1 / (F
CPU
÷
2
8
÷
16) = 500 ms, F
OSC
=32768Hz
1 - -
1 / (32768
÷
512
÷
16) ~ 0.25s
Table 8-1. Watchdog timer overflow time table