EasyManua.ls Logo

Holtek HT66F0175 - Page 168

Default Icon
207 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Rev. 1.50 168 August 28, 2017 Rev. 1.50 169 August 28, 2017
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
UART Interrupt Structure
SeveralindividualUARTconditionscangenerateaUARTinterrupt.Whentheseconditionsexist,
alowpulsewillbegeneratedtogettheattentionofthemicrocontroller.Theseconditionsarea
transmitterdataregisterempty,transmitteridle,receiverdataavailable,receiveroverrun,address
detectandanRXpinwake-up.Whenanyoftheseconditionsarecreated,ifitscorresponding
interruptcontrolisenabledandthestackisnotfull,theprogramwilljumptoitscorresponding
interruptvectorwhereitcanbeservicedbeforereturningtothemainprogram.Fourofthese
conditionshavethecorrespondingUSRregisteragswhichwillgenerateaUARTinterruptifits
associatedinterruptenablecontrolbitintheUCR2registerisset.Thetwotransmitterinterrupt
conditionshavetheirowncorrespondingenablecontrolbits,whilethetworeceiverinterrupt
conditionshaveasharedenablecontrolbit.Theseenablebitscanbeusedtomaskoutindividual
UARTinterruptsources.
Theaddressdetectcondition,whichisalsoaUARTinterruptsource,doesnothaveanassociated
flag,butwillgenerateaUARTinterruptwhenanaddressdetectconditionoccursifitsfunction
isenabledbysettingtheADDENbitintheUCR2register.AnRXpinwake-up,whichisalsoa
UARTinterruptsource,doesnothaveanassociatedag,butwillgenerateaUARTinterruptifthe
microcontrolleriswokenupfromIDLE0orSLEEPmodebyafallingedgeontheRXpin,ifthe
WAKEandRIEbitsintheUCR2registerareset.NotethatintheeventofanRXwake-upinterrupt
occurring,therewillbeacertainperiodofdelay,commonlyknownastheSystemStart-upTime,for
theoscillatortorestartandstabilizebeforethesystemresumesnormaloperation.
NotethattheUSRregisterflagsarereadonlyandcannotbeclearedorsetbytheapplication
program,neitherwilltheybeclearedwhentheprogramjumpstothecorrespondinginterrupt
servicingroutine,asisthecaseforsomeoftheotherinterrupts.Theflagswillbecleared
automaticallywhencertainactionsaretakenbytheUART,thedetailsofwhicharegiveninthe
UARTregistersection.TheoverallUARTinterruptcanbedisabledorenabledbytherelated
interruptenablecontrolbitsintheinterruptcontrolregistersofthemicrocontrollertodecidewhether
theinterruptrequestedbytheUARTmoduleismaskedoutorallowed.
USR Register
Transmitter Empty Flag TXIF
0
1
WAKE
Interrupt
signal to MCU
Transmitter Idle Flag TIDLE
Receiver Overrun Flag
OERR
Receiver Data Available
RXIF
RX Pin
Wake-up
UCR2 Register
OR
0
1
ADDEN
0
1
RIE
0
1
TIIE
0
1
TEIE
0
1
RX7 if BNO=0
RX8 if BNO=1
UCR2 Register
UART Interrupt
Request Flag
URF
0
1
URE
0
1
EMI
UART Interrupt Structure

Table of Contents