User Manual
67
T89C51AC2
Rev. B – 19-Dec-01
14.2 WatchDog Timer
during Power down
mode and Idle
In Power Down mode the oscillator stops, whi c h means the WDT also s t ops . While in
Power Down mode, the user does not need to s erv ice the WDT. There are 2 methods of
exiting Pow er Down mo de: by a hardware reset or via a level activated external interrupt
which is enabled prior to ent ering Po w er Down mode. When P ower Down is exited with
hardware reset, t he watch dog is disabled. Exiting Power Down with an interrupt is signif-
icantly d ifferent. The interrupt shall be held low long enough for the oscillator to stab ilize.
When the interru pt is brought high, the in t errupt is serviced. To prev ent the WDT f r om
res etting the devic e while th e int errupt pin is hel d low, the W DT is no t started until th e
interrupt is pulled high. I t is s uggested that the WDT be reset during the i nterrup t service
for the interrupt used t o exit Power Down.
To ensure that the WDT does not ov erf low wi thin a few states of exit ing powerdown, it is
best to reset the WDT just before entering powerdown.
In the I dle m ode, the oscillator continues to run. To pr event the WDT f rom resetting
T89C51A C2 wh ile in Idle mode, the user should always set up a t im er that will periodi-
cally exit Idle, service the WDT , and re-enter Idle mode.
14.2.1 Register Table 34. WDTPRG Re gister
WDTPRG (S:A7h)
WatchDog Timer D uration
Programming regis ter
Rese t Va lue = XXXX X000 b
76543210
- - - - - S2 S1 S0
Bit
Number
Bit
Mnemonic Description
7-
Reserved
The value read from this bit is indeterminate. Do not set this bit.
6-
Reserved
The value read from this bit is indeterminate. Do not set this bit.
5-
Reserved
The value read from this bit is indeterminate. Do not set this bit.
4-
Reserved
The value read from this bit is indeterminate. Do not set this bit.
3-
Reserved
The value read from this bit is indeterminate. Do not set this bit.
2S2
WatchDog Timer Duration selection bit 2
Work in conjunction with bit 1 and bit 0.
1S1
WatchDog Timer Duration selection bit 1
Work in conjunction with bit 2 and bit 0.
0S0
WatchDog Timer Duration selection bit 0
Work in conjunction with bit 1 and bit 2.










