Rev. 1.71 118 April 11, 2017 Rev. 1.71 119 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
EveryinterrupthasthecapabilityofwakingupthemicrocontrollerwhenitisinSLEEPorIDLE
Mode,thewakeupbeinggeneratedwhentheinterruptrequestagchangesfromlowtohigh.Ifitis
requiredtopreventacertaininterruptfromwakingupthemicrocontrollerthenitsrespectiverequest
agshouldberstsethighbeforeenterSLEEPorIDLEMode.
AsonlytheProgramCounterispushedontothestack,thenwhentheinterruptisserviced,ifthe
contentsoftheaccumulator,statusregisterorotherregistersarealteredbytheinterruptservice
program,theircontentsshouldbesavedtothememoryatthebeginningoftheinterruptservice
routine.
Toreturnfromaninterruptsubroutine,eitheraRETorRETIinstructionmaybeexecuted.TheRETI
instructioninadditiontoexecutingareturntothemainprogramalsoautomaticallysetstheEMI
bithightoallowfurtherinterrupts.TheRETinstructionhoweveronlyexecutesareturntothemain
programleavingtheEMIbitinitspresentzerostateandthereforedisablingtheexecutionoffurther
interrupts.
SCOM Function for LCD – HT66F004
TheHT66F004devicehasthecapabilityofdrivingexternalLCDpanels.Thecommonpinsfor
LCDdriving,SCOM0~SCOM3,arepinsharedwithcertainpinontheI/Oports.TheLCDsignals
aregeneratedusingtheapplicationprogram.
LCD peration
AnexternalLCDpanelcanbedrivenusingthisdevicebyconguringtheI/Opinsascommonpins.
TheLCDdriverfunctioniscontrolledusingtheSCOMCregisterwhichinadditiontocontrolling
theoverallon/offfunctionalsocontrolsthebiasvoltagesetupfunction.ThisenablestheLCDCOM
drivertogeneratethenecessaryV
DD
/2voltagelevelsforLCD1/2biasoperation.
TheSCOMENbitintheSCOMCregisteristheoverallmastercontrolfortheLCDdriver.The
LCDSCOMnpinisselectedtobeusedforLCDdrivingbythecorrespondingpin-sharedfunction
selectionbits.NotethatthePortControlregisterdoesnotneedtorstsetupthepinsasoutputsto
enabletheLCDdriveroperation.
LCD COM Bias