Rev. 1.71 48 April 11, 2017 Rev. 1.71 49 April 11, 2017
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
SMOD1 Register
Bit 7 6 5 4 3 2 1 0
Name FSYSON — — — D3 LVRF — WRF
R/W R/W — — — R/W R/W — R/W
POR 0 — — — 0 x — 0
“x” unknown
B
it7 FSYSON:f
SYS
ControlinIDLEMode
0:Disable
1:Enable
Bit6~4 Unimplemented,readas0
Bit3 D3:Reservedbit
Bit2 LVRF:LVRfunctionresetag
0:Notactive
1:Active
Thisbitcanbeclearto“0”,butcannotbesetto“1”.
Bit1 Unimplemented,readas0
Bit0 WRF:WDTControlregistersoftwareresetag
0:Notoccur
1:Occurred
Thisbitissetto1bytheWDTControlregistersoftwareresetandclearedbytheapplicationprogram.
Notethatthisbitcanonlybeclearedto0bytheapplicationprogram.
Watchdog Timer Operation
TheWatchdogTimeroperatesbyprovidingadeviceresetwhenitstimeroverows.Thismeans
thatintheapplicationprogramandduringnormaloperationtheuserhastostrategicallyclearthe
WatchdogTimerbeforeitoverowstopreventtheWatchdogTimerfromexecutingareset.Thisis
doneusingtheclearwatchdoginstructions.Iftheprogrammalfunctionsforwhateverreason,jumps
toanunknownlocation,orentersanendlessloop,theclearWDTinstructionswillnotbeexecuted
inthecorrectmanner,inwhichcasetheWatchdogTimerwilloverowandresetthedevice.With
regardtotheWatchdogTimerenable/disablefunction,therearevebits,WE4~WE0,intheWDTC
registertoadditionalenable/disableandresetcontroloftheWatchdogTimer.
WE4 ~ WE0 Bits WDT Function
10101B Disable
01010B Enable
Any other value Reset MCU
Watchdog Timer Enable/Disable Control
Undernormalprogramoperation,aWatchdogTimertime-outwillinitialiseadeviceresetandset
thestatusbitTO.However,ifthesystemisintheSLEEPorIDLEMode,whenaWatchdogTimer
time-outoccurs,theTObitinthestatusregisterwillbesetandonlytheProgramCounterandStack
Pointerwillbereset.FourmethodscanbeadoptedtoclearthecontentsoftheWatchdogTimer.
TherstisaWDTreset,whichmeansavalueotherthan01010Band10101Biswrittenintothe
WE4~WE0bitlocations,thesecondisanexternalhardwarereset,whichmeansalowlevelonthe
externalresetpin,thethirdisusingtheWatchdogTimersoftwareclearinstructionsandthefourth
isviaaHALTinstruction.Thereisonlyonemethodofusingsoftwareinstructiontoclearthe
WatchdogTimer.Thatistousethesingle“CLRWDT”instructiontocleartheWDT.