Rev. 2.50 28 June 22, 2017 Rev. 2.50 29 June 22, 2017
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
Stack
ThisisaspecialpartofthememorywhichisusedtosavethecontentsoftheProgramCounteronly.
Thestackhasmultiplelevelsdependinguponthedeviceandisneitherpartofthedatanorpartof
theprogramspace,andisneitherreadablenorwriteable.TheactivatedlevelisindexedbytheStack
Pointer,andisneitherreadablenorwriteable.Atasubroutinecallorinterruptacknowledgesignal,the
contentsoftheProgramCounterarepushedontothestack.Attheendofasubroutineoraninterrupt
routine,signaledbyareturninstruction,RETorRETI,theProgramCounterisrestoredtoitsprevious
valuefromthestack.Afteradevicereset,theStackPointerwillpointtothetopofthestack.
Ifthestackisfullandanenabledinterrupttakesplace,theinterruptrequestagwillberecordedbut
theacknowledgesignalwillbeinhibited.WhentheStackPointerisdecremented,byRETorRETI,
theinterruptwillbeserviced.Thisfeaturepreventsstackoverowallowingtheprogrammertouse
thestructuremoreeasily.However,whenthestackisfull,aCALLsubroutineinstructioncanstill
beexecutedwhichwillresultinastackoverow.Precautionsshouldbetakentoavoidsuchcases
whichmightcauseunpredictableprogrambranching.
Ifthestackisoverow,therstProgramCountersaveinthestackwillbelost.
Program C ounter
Sta ck Level 1
Sta ck Level 2
Sta ck Level 3
Sta ck Level N
Program
Memory
Top of S ta ck
Stack
Poin te r
Botto m of S ta ck
Device Stack Levels
HT66F20/HT66F30 4
HT66F40/HT66F50 8
HT66F60
12
Arithmetic and Logic Unit – ALU
Thearithmetic-logicunitorALUisacriticalareaofthemicrocontrollerthatcarriesoutarithmetic
andlogicoperationsoftheinstructionset.Connectedtothemainmicrocontrollerdatabus,theALU
receivesrelatedinstructioncodesandperformstherequiredarithmeticorlogicaloperationsafter
whichtheresultwillbeplacedinthespeciedregister.AstheseALUcalculationoroperationsmay
resultincarry,borroworotherstatuschanges,thestatusregisterwillbecorrespondinglyupdatedto
reectthesechanges.TheALUsupportsthefollowingfunctions:
• Arithmeticoperations:ADD,ADDM,ADC,ADCM,SUB,SUBM,SBC,SBCM,DAA
• Logicoperations:AND,OR,XOR,ANDM,ORM,XORM,CPL,CPLA
• Rotation:RRA,RR,RRCA,RRC,RLA,RL,RLCA,RLC
• IncrementandDecrement:INCA,INC,DECA,DEC
• Branchdecision:JMP,SZ,SZA,SNZ,SIZ,SDZ,SIZA,SDZA,CALL,RET,RETI