HT45F12
8-Bit Flash MCU with Op Amps & Comparators
Reset and Initialisation
Aꢀresetꢀfunctionꢀisꢀaꢀfundamentalꢀpartꢀofꢀanyꢀmicrocontrollerꢀensuringꢀthatꢀtheꢀdeviceꢀcanꢀbeꢀsetꢀ
toꢀsomeꢀpredeterminedꢀconditionꢀirrespectiveꢀofꢀoutsideꢀparameters.ꢀTheꢀmostꢀimportantꢀresetꢀ
conditionꢀisꢀafterꢀpowerꢀisꢀfirstꢀappliedꢀtoꢀtheꢀmicrocontroller.ꢀInꢀthisꢀcase,ꢀinternalꢀcircuitryꢀwillꢀ
ensureꢀthatꢀtheꢀmicrocontroller,ꢀafterꢀaꢀshortꢀdelay,ꢀwillꢀbeꢀinꢀaꢀwellꢀdefinedꢀstateꢀandꢀreadyꢀtoꢀ
executeꢀtheꢀfirstꢀprogramꢀinstruction.ꢀAfterꢀthisꢀpower-onꢀreset,ꢀcertainꢀimportantꢀinternalꢀregistersꢀ
willꢀbeꢀsetꢀtoꢀdefinedꢀstatesꢀbeforeꢀtheꢀprogramꢀcommences.ꢀOneꢀofꢀtheseꢀregistersꢀisꢀtheꢀProgramꢀ
Counter,ꢀwhichꢀwillꢀbeꢀresetꢀtoꢀzeroꢀforcingꢀtheꢀmicrocontrollerꢀtoꢀbeginꢀprogramꢀexecutionꢀfromꢀtheꢀ
lowestꢀProgramꢀMemoryꢀaddress.
AnotherꢀtypeꢀofꢀresetꢀisꢀwhenꢀtheꢀWatchdogꢀTimerꢀoverflowsꢀandꢀresetsꢀtheꢀmicrocontroller.ꢀAllꢀ
typesꢀofꢀresetꢀoperationsꢀresultꢀinꢀdifferentꢀregisterꢀconditionsꢀbeingꢀsetup.ꢀAnotherꢀresetꢀexistsꢀinꢀtheꢀ
formꢀofꢀaꢀLowꢀVoltageꢀReset,ꢀLVR,ꢀwhereꢀaꢀfullꢀreset,ꢀisꢀimplementedꢀinꢀsituationsꢀwhereꢀtheꢀpowerꢀ
supplyꢀvoltageꢀfallsꢀbelowꢀaꢀcertainꢀthreshold.
Reset Functions
Thereꢀareꢀfourꢀwaysꢀinꢀwhichꢀaꢀmicrocontrollerꢀresetꢀcanꢀoccur,ꢀthroughꢀeventsꢀoccurringꢀbothꢀ
internallyꢀandꢀexternally:
Power-on Reset
Theꢀmostꢀfundamentalꢀandꢀunavoidableꢀresetꢀisꢀtheꢀoneꢀthatꢀoccursꢀafterꢀpowerꢀisꢀfirstꢀappliedꢀtoꢀ
theꢀmicrocontroller.ꢀAsꢀwellꢀasꢀensuringꢀthatꢀtheꢀProgramꢀMemoryꢀbeginsꢀexecutionꢀfromꢀtheꢀfirstꢀ
memoryꢀaddress,ꢀaꢀpower-onꢀresetꢀalsoꢀensuresꢀthatꢀcertainꢀotherꢀregistersꢀareꢀpresetꢀtoꢀknownꢀ
conditions.ꢀAllꢀtheꢀI/Oꢀportꢀandꢀportꢀcontrolꢀregistersꢀwillꢀpowerꢀupꢀinꢀaꢀhighꢀconditionꢀensuringꢀthatꢀ
allꢀpinsꢀwillꢀbeꢀfirstꢀsetꢀtoꢀinputs.ꢀ
V
D
D
P
w
o
r
e
o
-
n
R
s
e
t
e
t
R
T
S
D
S
S
T
i
T
m
e
-
o
u
t
Note:ꢀtRSTDꢀisꢀpower-onꢀdelay,ꢀtypicalꢀtime=50ms
Power-On Reset Timing Chart
Low Voltage Reset – LVR
Theꢀmicrocontrollerꢀcontainsꢀaꢀlowꢀvoltageꢀresetꢀcircuitꢀinꢀorderꢀtoꢀmonitorꢀtheꢀsupplyꢀvoltageꢀofꢀ
theꢀdevice.ꢀTheꢀLVRꢀfunctionꢀhasꢀaꢀspecificꢀLVRꢀvoltageꢀVLVR.ꢀIfꢀtheꢀsupplyꢀvoltageꢀofꢀtheꢀdeviceꢀ
dropsꢀtoꢀwithinꢀaꢀrangeꢀofꢀ0.9V~VLVRꢀsuchꢀasꢀmightꢀoccurꢀwhenꢀchangingꢀtheꢀbattery,ꢀtheꢀLVRꢀwillꢀ
automaticallyꢀresetꢀtheꢀdeviceꢀinternallyꢀandꢀtheꢀLVRFꢀbitꢀinꢀtheꢀCTRLꢀregisterꢀwillꢀalsoꢀbeꢀsetꢀ
toꢀ1.ꢀTheꢀLVRꢀincludesꢀtheꢀfollowingꢀspecifications:ꢀForꢀaꢀvalidꢀLVRꢀsignal,ꢀaꢀlowꢀvoltage,ꢀi.e.,ꢀaꢀ
voltageꢀinꢀtheꢀrangeꢀbetweenꢀ0.9V~VLVRꢀmustꢀexistꢀforꢀgreaterꢀthanꢀtheꢀvalueꢀtLVRꢀspecifiedꢀinꢀtheꢀ
A.C.ꢀcharacteristics.ꢀIfꢀtheꢀlowꢀvoltageꢀstateꢀdoesꢀnotꢀexceedꢀtLVR,ꢀtheꢀLVRꢀwillꢀignoreꢀitꢀandꢀwillꢀ
notꢀperformꢀaꢀresetꢀfunction.ꢀOneꢀofꢀaꢀrangeꢀofꢀspecifiedꢀvoltageꢀvaluesꢀforꢀVLVRꢀcanꢀbeꢀselectedꢀbyꢀ
theꢀLVSꢀbitsꢀinꢀtheꢀLVRCꢀregister.ꢀIfꢀtheꢀLVS7~LVS0ꢀbitsꢀhaveꢀanyꢀotherꢀvalue,ꢀwhichꢀmayꢀperhapsꢀ
occurꢀdueꢀtoꢀadverseꢀenvironmentalꢀconditionsꢀsuchꢀasꢀnoise,ꢀtheꢀLVRꢀwillꢀresetꢀtheꢀdeviceꢀafterꢀ
2~3ꢀLIRCꢀclockꢀcycles.ꢀWhenꢀthisꢀhappens,ꢀtheꢀLRFꢀbitꢀinꢀtheꢀCTRLꢀregisterꢀwillꢀbeꢀsetꢀtoꢀ1.ꢀAfterꢀ
powerꢀonꢀtheꢀregisterꢀwillꢀhaveꢀtheꢀvalueꢀofꢀ01010101B.
NoteꢀthatꢀtheꢀLVRꢀfunctionꢀwillꢀbeꢀautomaticallyꢀdisabledꢀwhenꢀtheꢀdeviceꢀentersꢀtheꢀpowerꢀdownꢀ
mode.
Rev. 0.00
48
�eꢀteꢁꢂeꢃ ꢄꢅꢆ ꢄ01ꢄ