Rev. 2.50 256 June 22, 2017 Rev. 2.50 257 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
Address detect mode
SettingtheAddressDetectfunctionenablecontrolbit,ADDEN,intheUCR2register,enablesthis
specialfunction.Ifthisbitissetto1,thenanadditionalqualierwillbeplacedonthegeneration
ofaReceiverDataAvailableinterrupt,whichisrequestedbytheRXIFflag.IftheADDENbit
isequalto1,thenwhenthedataisavailable,aninterruptwillonlybegenerated,ifthehighest
receivedbithasahighvalue.NotethattherelatedinterruptenablecontrolbitandtheEMIbitofthe
microcontrollermustalsobeenabledforcorrectinterruptgeneration.Thehighestaddressbitisthe
9thbitifthebitBNO=1orthe8thbitifthebitBNO=0.Ifthehighestbitishigh,thenthereceived
wordwillbedenedasanaddressratherthandata.ADataAvailableinterruptwillbegenerated
everytimethelastbitofthereceivedwordisset.IftheADDENbitisequalto0,thenaReceive
DataAvailableinterruptwillbegeneratedeachtimetheRXIFagisset,irrespectiveofthedatalast
butstatus.Theaddressdetectandparityfunctionsaremutuallyexclusivefunctions.Thereforeifthe
addressdetectfunctionisenabled,thentoensurecorrectoperation,theparityfunctionshouldbe
disabledbyresettingtheparityfunctionenablebitPRENtozero.
ADDEN
Bit 9 (BNO=1)
Bit 8 (BNO=0)
UART Interrupt
Generated
0
0 √
1 √
1
0 ×
1 √
ADDEN Bit Function
UART Module Power-down and Wake-up
TheMCUandUARTModulearepowereddownindependentlyofeachother.Themethodof
poweringdowntheMCUiscoveredinthepreviousMCUsectionofthedatasheet.TheUART
ModulemustbepowereddownbeforetheMCUispowereddown.Thisisimplementedbyfirst
clearingtheUARTENbitintheUCR1registertodisabletheUARTModulecircuitryafterwhich
theSCSinternallinecanbesethightodisabletheSPIinterfacecircuits.WhentheUARTand
SPIinterfacesarepowereddown,theSCKandCLKIclocksourcestotheUARTmodulewillbe
disabled.TheUARTModulecanbepoweredupbytheMCUbyrstclearingtheSCSlinetozero
andthensettingtheUARTENbit.IftheUARTcircuitsispowereddownwhileatransmissionisstill
inprogress,thenthetransmissionwillbeterminatedandtheexternalTXtransmitpinwillbeforced
toalogichighlevel.Inasimilarway,iftheUARTcircuitsispowereddownwhilereceivingdata,
thenthereceptionofdatawilllikewisebeterminated.WhentheUARTcircuitsispowereddown,
notethattheUSR,UCR1,UCR2,UCR3,transmitandreceiveregisters,aswellastheBRGregister
willnotbeaffected.
TheUARTModulecontainsareceiverRXpinwake-upfunction,whichisenabledordisabledby
theWAKEbitintheUCR2register.Ifthisbit,alongwiththeUARTenablebitnamedUARTEN,
thereceiverenablebitnamedRXENandthereceiverinterruptenablebitnamedRIE,areallset
beforetheMCUandUARTmodulearepowereddown,thenafallingedgeontheRXpinwillwake
uptheMCUfromitspowerdowncondition.Notethatasittakesacertainperiodoftimeknownas
theSystemStart-upTimeforoscillatortorestartandstabilizeafterawake-up,anydatareceived
duringthistimeontheRXpinwillbeignored.
ForaUARTwake-upinterrupttooccur,inadditiontothebitsforthewake-upenablecontrol
andReceiveinterruptenablecontrolbeingset,theglobalinterruptenablecontrolandtherelated
interruptenablecontrolbitsmustalsobeset.Ifthesetwobitsarenotset,thenonlyawake-upevent
willoccurandnointerruptwillbeserviced.Notealsothatasittakesaperiodofdelayafterawake-
upbeforenormalmicrocontrollerresumes,therelevantUARTinterruptwillnotbeserviceduntil
thisperiodofdelaytimehaselapsed.