HT45F12
8-Bit Flash MCU with Op Amps & Comparators
Bank Pointer – BP
TheꢀDataꢀMemoryꢀisꢀdividedꢀintoꢀtwoꢀBanks,ꢀknownꢀasꢀBankꢀ0ꢀandꢀBankꢀ1.ꢀAꢀBankꢀPointer,ꢀwhichꢀ
isꢀbitꢀ0ꢀofꢀtheꢀBankꢀPointerꢀregisterꢀisꢀusedꢀtoꢀselectꢀtheꢀrequiredꢀDataꢀMemoryꢀbank.ꢀOnlyꢀdataꢀinꢀ
Bankꢀ0ꢀcanꢀbeꢀdirectlyꢀaddressed,ꢀasꢀdataꢀinꢀBankꢀ1ꢀmustꢀbeꢀindirectlyꢀaddressedꢀusingꢀMemoryꢀ
PointerꢀMP1ꢀandꢀIndirectꢀAddressingꢀRegisterꢀIAR1.ꢀUsingꢀMemoryꢀPointerꢀMP0ꢀandꢀIndirectꢀ
AddressingꢀRegisterꢀIAR0ꢀwillꢀalwaysꢀaccessꢀdataꢀfromꢀBankꢀ0,ꢀirrespectiveꢀofꢀtheꢀvalueꢀofꢀtheꢀ
BankꢀPointer.ꢀMemoryꢀPointerꢀMP1ꢀandꢀIndirectꢀAddressingꢀRegisterꢀIAR1ꢀcanꢀindirectlyꢀaddressꢀ
dataꢀinꢀeitherꢀBankꢀ0ꢀorꢀBankꢀ1ꢀdependingꢀuponꢀtheꢀvalueꢀofꢀtheꢀBankꢀPointer.ꢀ
TheꢀDataꢀMemoryꢀisꢀinitialisedꢀtoꢀBankꢀ0ꢀafterꢀaꢀreset,ꢀexceptꢀforꢀtheꢀWDTꢀtime-outꢀresetꢀinꢀtheꢀIdle/
SleepꢀMode,ꢀinꢀwhichꢀcase,ꢀtheꢀDataꢀMemoryꢀbankꢀremainsꢀunaffected.ꢀItꢀshouldꢀbeꢀnotedꢀthatꢀSpecialꢀ
FunctionꢀDataꢀMemoryꢀisꢀnotꢀaffectedꢀbyꢀtheꢀbankꢀselection,ꢀwhichꢀmeansꢀthatꢀtheꢀSpecialꢀFunctionꢀ
RegistersꢀcanꢀbeꢀaccessedꢀfromꢀwithinꢀeitherꢀBankꢀ0ꢀorꢀBankꢀ1.ꢀDirectlyꢀaddressingꢀtheꢀDataꢀMemoryꢀ
willꢀalwaysꢀresultꢀinꢀBankꢀ0ꢀbeingꢀaccessedꢀirrespectiveꢀofꢀtheꢀvalueꢀofꢀtheꢀBankꢀPointer.
BP Register
Bit
7
6
5
4
3
2
1
0
Naꢁe
R/W
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
BP0
R/W
0
POR
Bitꢀ7~1ꢀ
Bitꢀ0ꢀ
Unimplemented,ꢀreadꢀasꢀ"0"
BP0:ꢀSelectꢀDataꢀMemoryꢀBanksꢀ
ꢀ 0:ꢀBankꢀ0ꢀ
ꢀ 1:ꢀBankꢀ1
Accumulator – ACC
TheꢀAccumulatorꢀisꢀcentralꢀtoꢀtheꢀoperationꢀofꢀanyꢀmicrocontrollerꢀandꢀisꢀcloselyꢀrelatedꢀwithꢀ
operationsꢀcarriedꢀoutꢀbyꢀtheꢀALU.ꢀTheꢀAccumulatorꢀisꢀtheꢀplaceꢀwhereꢀallꢀintermediateꢀresultsꢀ
fromꢀtheꢀALUꢀareꢀstored.ꢀWithoutꢀtheꢀAccumulatorꢀitꢀwouldꢀbeꢀnecessaryꢀtoꢀwriteꢀtheꢀresultꢀofꢀ
eachꢀcalculationꢀorꢀlogicalꢀoperationꢀsuchꢀasꢀaddition,ꢀsubtraction,ꢀshift,ꢀetc.,ꢀtoꢀtheꢀDataꢀMemoryꢀ
resultingꢀinꢀhigherꢀprogrammingꢀandꢀtimingꢀoverheads.ꢀDataꢀtransferꢀoperationsꢀusuallyꢀinvolveꢀ
theꢀtemporaryꢀstorageꢀfunctionꢀofꢀtheꢀAccumulator;ꢀforꢀexample,ꢀwhenꢀtransferringꢀdataꢀbetweenꢀ
oneꢀuserꢀdefinedꢀregisterꢀandꢀanother,ꢀitꢀisꢀnecessaryꢀtoꢀdoꢀthisꢀbyꢀpassingꢀtheꢀdataꢀthroughꢀtheꢀ
Accumulatorꢀasꢀnoꢀdirectꢀtransferꢀbetweenꢀtwoꢀregistersꢀisꢀpermitted.
Program Counter Low Register – PCL
Toꢀprovideꢀadditionalꢀprogramꢀcontrolꢀfunctions,ꢀtheꢀlowꢀbyteꢀofꢀtheꢀProgramꢀCounterꢀisꢀmadeꢀ
accessibleꢀtoꢀprogrammersꢀbyꢀlocatingꢀitꢀwithinꢀtheꢀSpecialꢀPurposeꢀareaꢀofꢀtheꢀDataꢀMemory.ꢀByꢀ
manipulatingꢀthisꢀregister,ꢀdirectꢀjumpsꢀtoꢀotherꢀprogramꢀlocationsꢀareꢀeasilyꢀimplemented.ꢀLoadingꢀ
aꢀvalueꢀdirectlyꢀintoꢀthisꢀPCLꢀregisterꢀwillꢀcauseꢀaꢀjumpꢀtoꢀtheꢀspecifiedꢀProgramꢀMemoryꢀlocation,ꢀ
however,ꢀasꢀtheꢀregisterꢀisꢀonlyꢀ8-bitꢀwide,ꢀonlyꢀjumpsꢀwithinꢀtheꢀcurrentꢀProgramꢀMemoryꢀpageꢀareꢀ
permitted.ꢀWhenꢀsuchꢀoperationsꢀareꢀused,ꢀnoteꢀthatꢀaꢀdummyꢀcycleꢀwillꢀbeꢀinserted.
Look-up Table Registers – TBLP, TBHP, TBLH
Theseꢀthreeꢀspecialꢀfunctionꢀregistersꢀareꢀusedꢀtoꢀcontrolꢀoperationꢀofꢀtheꢀlook-upꢀtableꢀwhichꢀisꢀ
storedꢀinꢀtheꢀProgramꢀMemory.ꢀTBLPꢀandꢀTBHPꢀareꢀtheꢀtableꢀpointerꢀandꢀindicatesꢀtheꢀlocationꢀ
whereꢀtheꢀtableꢀdataꢀisꢀlocated.ꢀTheirꢀvalueꢀmustꢀbeꢀsetupꢀbeforeꢀanyꢀtableꢀreadꢀcommandsꢀareꢀ
executed.ꢀTheirꢀvalueꢀcanꢀbeꢀchanged,ꢀforꢀexampleꢀusingꢀtheꢀ“INC”ꢀorꢀ“DEC”ꢀinstructions,ꢀallowingꢀ
forꢀeasyꢀtableꢀdataꢀpointingꢀandꢀreading.ꢀTBLHꢀisꢀtheꢀlocationꢀwhereꢀtheꢀhighꢀorderꢀbyteꢀofꢀtheꢀtableꢀ
dataꢀisꢀstoredꢀafterꢀaꢀtableꢀreadꢀdataꢀinstructionꢀhasꢀbeenꢀexecuted.ꢀNoteꢀthatꢀtheꢀlowerꢀorderꢀtableꢀ
dataꢀbyteꢀisꢀtransferredꢀtoꢀaꢀuserꢀdefinedꢀlocation.
Rev. 0.00
ꢄꢅ
�eꢀteꢁꢂeꢃ ꢄꢅꢆ ꢄ01ꢄ