EasyManua.ls Logo

Holtek BS82B12A-3 - Page 58

Holtek BS82B12A-3
168 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Rev. 1.20 58 January 23, 2015 Rev. 1.20 59 January 23, 2015
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
CTRL Register
Bit 7 6 5 4 3 2 1 0
Name FSYSON HIRCS1 HIRCS0 LXTLP LVRF D1 WRF
R/W R/W R/W R/W R/W R/W R/W R/W
POR 0 0 0 0 x 0 0
"x"
unknown
Bit7 FSYSON:f
SYS
ControlinIDLEMode
Describeelsewhere
Bit6 Unimplemented,readas"0"
Bit
5~4 HIRCS1~HIRCS0:HIRCfrequencyclockselect
Describeelsewhere
Bit3 LXTLP:LXTlowpowercontrol
Describeelsewhere
Bit2 LVRF:LVRfunctionresetag
Describeelsewhere
Bit1 Undenedbit
Thisbitcanbereadorwrittenbyusersoftwareprogram
Bit0 WRF:WDTControlregistersoftwareresetag
0:Notoccur
1:Occurred
ThisbitissethighbytheWDTControlregistersoftwareresetandclearedbythe
applicationprogram.Notethatthisbitcanonlybeclearedtozerobytheapplication
program.
Watchdog Timer Operation
TheWatchdogTimeroperatesbyprovidingadeviceresetwhenitstimeroverows.Thismeans
thatintheapplicationprogramandduringnormaloperationtheuserhastostrategicallyclearthe
WatchdogTimerbeforeitoverowstopreventtheWatchdogTimerfromexecutingareset.Thisis
doneusingtheclearwatchdoginstructions.Iftheprogrammalfunctionsforwhateverreason,jumps
toanunknownlocation,orentersanendlessloop,theclearWDTinstructionwillnotbeexecutedin
thecorrectmanner,inwhichcasetheWatchdogTimerwilloverowandresetthedevice.Thereare
vebits,WE4~WE0,intheWDTCregistertoenabletheWDTfunction.WhentheWE4~WE0bits
valueisequalto01010Bor10101B,theWDTfunctionisenabled.However,iftheWE4~WE0bits
arechangedtoanyothervaluesexcept01010Band10101B,whichiscausedbytheenvironmental
noise,itwillresetthemicrocontrollerafter2~3LIRCclockcycles.Afterpoweronthesebitswill
haveavalueof01010B.
Undernormalprogramoperation,aWatchdogTimertime-outwillinitialiseadeviceresetandset
thestatusbitTO.However,ifthesystemisintheSLEEPorIDLEMode,whenaWatchdogTimer
time-outoccurs,theTObitinthestatusregisterwillbesetandonlytheProgramCounterandStack
Pointerwillbereset.ThreemethodscanbeadoptedtoclearthecontentsoftheWatchdogTimer.
TherstisaWDTsoftwarereset,whichmeansacertainvalueiswrittenintotheWE4~WE0bit
ledexcept01010Band10101B,thesecondisusingtheWatchdogTimersoftwareclearinstruction
andthethirdisviaaHALTinstruction.
ThereisonlyonemethodofusingsoftwareinstructiontocleartheWatchdogTimer.Thatistouse
thesingle"CLRWDT"instructiontocleartheWDT.
Themaximumtime-outperiodiswhenthe2
18
divisionratioisselected.Asanexample,witha32
kHzLIRCoscillatorasitssourceclock,thiswillgiveamaximumwatchdogperiodofaround8
secondsforthe2
18
divisionratio,andaminimumtimeoutof7.8msforthe2
8
divisionration.

Table of Contents

Related product manuals