Rev. 1.71 30 April 11, 2017 Rev. 1.71 31 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
Bank Pointer – BP
Forthisseriesofdevices,theDataMemoryisdividedintotwobanks,Bank0andBank1.Selecting
therequiredDataMemoryareaisachievedusingtheBankPointer.Bit0oftheBankPointerisused
toselectDataMemoryBanks0~1.
TheDataMemoryisinitialisedtoBank0afterareset,exceptforaWDTtime-outresetinthePower
DownMode,inwhichcase,theDataMemorybankremainsunaffected.Itshouldbenotedthatthe
SpecialFunctionDataMemoryisnotaffectedbythebankselection,whichmeansthattheSpecial
FunctionRegisterscanbeaccessedfromwithinanybank.DirectlyaddressingtheDataMemory
willalwaysresultinBank0beingaccessedirrespectiveofthevalueoftheBankPointer.Accessing
datafromBank1mustbeimplementedusingIndirectAddressing.
BP Register
Bit 7 6 5 4 3 2 1 0
Name — — — — — — — DMBP0
R/W — — — — — — — R/W
POR — — — — — — — 0
B
it7~1 Unimplemented,readas"0"
Bit0 DMBP0:SelectDataMemoryBanks
0:Bank0
1:Bank1
Accumulator – ACC
TheAccumulatoriscentraltotheoperationofanymicrocontrollerandiscloselyrelatedwith
operationscarriedoutbytheALU.TheAccumulatoristheplacewhereallintermediateresults
fromtheALUarestored.WithouttheAccumulatoritwouldbenecessarytowritetheresultof
eachcalculationorlogicaloperationsuchasaddition,subtraction,shift,etc.,totheDataMemory
resultinginhigherprogrammingandtimingoverheads.Datatransferoperationsusuallyinvolve
thetemporarystoragefunctionoftheAccumulator;forexample,whentransferringdatabetween
oneuser-definedregisterandanother,itisnecessarytodothisbypassingthedatathroughthe
Accumulatorasnodirecttransferbetweentworegistersispermitted.
Program Counter Low Register – PCL
Toprovideadditionalprogramcontrolfunctions,thelowbyteoftheProgramCounterismade
accessibletoprogrammersbylocatingitwithintheSpecialPurposeareaoftheDataMemory.By
manipulatingthisregister,directjumpstootherprogramlocationsareeasilyimplemented.Loading
avaluedirectlyintothisPCLregisterwillcauseajumptothespeciedProgramMemorylocation,
however,astheregisterisonly8-bitwide,onlyjumpswithinthecurrentProgramMemorypageare
permitted.Whensuchoperationsareused,notethatadummycyclewillbeinserted.
Look-up Table Registers – TBLP, TBLH
Thesetwospecialfunctionregistersareusedtocontroloperationofthelook-uptablewhichis
storedintheProgramMemory.TBLPisthetablepointerandindicatethelocationwherethetable
dataislocated.Itsvaluemustbesetupbeforeanytablereadcommandsareexecuted.Itsvalue
canbechanged,forexampleusingthe“INC”or“DEC”instructions,allowingforeasytabledata
pointingandreading.TBLHisthelocationwherethehighorderbyteofthetabledataisstored
afteratablereaddatainstructionhasbeenexecuted.Notethatthelowerordertabledatabyteis
transferredtoauserdenedlocation.