EasyManua.ls Logo

Holtek BS82B12A-3 - Page 130

Holtek BS82B12A-3
168 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.20 130 January 23, 2015 Rev. 1.20 131 January 23, 2015
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
Noise Error – NF Flag
Over-samplingisusedfordatarecoverytoidentifyvalidincomingdataandnoise.Ifnoiseis
detectedwithinaframethefollowingwilloccur:
• Thereadonlynoiseag,NF,intheUSRregisterwillbesetontherisingedgeoftheRXIFbit.
• DatawillbetransferredfromtheShiftregistertotheRXRregister.
• Nointerruptwillbegenerated.HoweverthisbitrisesatthesametimeastheRXIFbitwhich
itselfgeneratesaninterrupt.
NotethattheNFagisresetbyaUSRregisterreadoperationfollowedbyanRXRregisterread
operation.
Framing Error – FERR Flag
Thereadonlyframingerrorag,FERR,intheUSRregister,issetifazeroisdetectedinsteadof
stopbits.Iftwostopbitsareselected,onlytherststopbitisdetected,itmustbehigh.Iftherst
stopbitislow,theFERRagwillbeset.TheFERRagisbufferedalongwiththereceiveddata
andisclearedonanyreset.
Parity Error – PERR Flag
Thereadonlyparityerrorag,PERR,intheUSRregister,issetiftheparityofthereceivedwordis
incorrect.Thiserroragisonlyapplicableiftheparityisenabled,PRENbitis"1",andiftheparity
type,oddorevenisselected.ThereadonlyPERRflagisbufferedalongwiththereceiveddata
bytes.Itisclearedonanyreset.ItshouldbenotedthattheFERRandPERRagsarebufferedalong
withthecorrespondingwordandshouldbereadbeforereadingthedataword.
UART Module 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.

Table of Contents

Related product manuals