Rev. 1.20 52 January 23, 2015 Rev. 1.20 53 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
Operating Mode Switching
Thedevicescanswitchbetweenoperatingmodesdynamicallyallowingtheusertoselectthebest
performance/powerratioforthepresenttaskinhand.Inthiswaymicrocontrolleroperationsthat
donotrequirehighperformancecanbeexecutedusingslowerclocksthusrequiringlessoperating
currentandprolongingbatterylifeinportableapplications.
Insimpleterms,ModeSwitchingbetweentheNORMALModeandSLOWModeisexecuted
usingtheHLCLKbitandCKS2~CKS0bitsintheSMODregisterwhileModeSwitchingfromthe
NORMAL/SLOWModestotheSLEEP/IDLEModesisexecutedviatheHALTinstruction.When
aHALTinstructionisexecuted,whetherthedevicesentertheIDLEModeortheSLEEPModeis
determinedbytheconditionoftheIDLENbitintheSMODregisterandFSYSONintheCTRL
register.
WhentheHLCLKbitswitchestoalowlevel,whichimpliesthatclocksourceisswitchedfromthe
highspeedclocksource,f
H
,totheclocksource,f
H
/2~f
H
/64orf
SUB
.Iftheclockisfromthef
SUB
,the
highspeedclocksourcewillstoprunningtoconservepower.Whenthishappensitmustbenoted
thatthef
H
/16andf
H
/64internalclocksourceswillalsostoprunning.Theaccompanyingowchart
showswhathappenswhenthedevicesmovebetweenthevariousoperatingmodes.
NORMAL Mode to SLOW Mode Switching
WhenrunningintheNORMALMode,whichusesthehighspeedsystemoscillator,andtherefore
consumesmorepower,thesystemclockcanswitchtorunintheSLOWModebyclearingthe
HLCLKbittozeroandsettingtheCKS2~CKS0bitsto"000"or"001"intheSMODregister.This
willthenusethelowspeedsystemoscillatorwhichwillconsumelesspower.Usersmaydecideto
dothisforcertainoperationswhichdonotrequirehighperformanceandcansubsequentlyreduce
powerconsumption.
TheSLOWModeissourcedfromtheLXTorLIRCoscillatorandthereforerequiresthese
oscillatorstobestablebeforefullmodeswitchingoccurs.ThisismonitoredusingtheLTObitinthe
SMODregister.