Rev. 2.50 242 June 22, 2017 Rev. 2.50 243 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
USR Register
TheUSRregisteristhestatusregisterfortheUART,whichcanbereadbytheapplicationprogram
todeterminethepresentstatusoftheUART.AllagswithintheUSRregisterarereadonly.Further
explanationoneachoftheagsisgivenbelow:
Bit 7 6 5 4 3 2 1 0
Name PERR NF FERR OERR RIDLE RXIF TIDLE TXIF
R/W R R R R R R R R
POR 0 0 0 0
1 0 1 1
Bit7 PERR:Parityerrorag
0:Noparityerrorisdetected
1:Parityerrorisdetected
ThePERRflagistheparityerrorflag.Whenthisreadonlyflagis0,itindicatesa
parityerrorhasnotbeendetected.Whentheagis1,itindicatesthattheparityofthe
receivedwordisincorrect.ThiserroragisapplicableonlyifParitymode(oddor
even)isselected.Theagcanalsobeclearedbyasoftwaresequencewhichinvolves
areadtothestatusregisterUSRfollowedbyanaccesstotheRXRdataregister.
Bit6 NF:Noiseag
0:Nonoiseisdetected
1:Noiseisdetected
TheNRflagisthenoiseflag.Whenthisreadonlyflagis0,itindicatesnonoise
condition.Whentheflagis1,itindicatesthattheUARThasdetectednoiseonthe
receiverinput.TheNFagissetduringthesamecycleastheRXIFagbutwillnot
besetinthecaseofasoverrun.TheNFagcanbeclearedbyasoftwaresequence
whichwillinvolveareadtothestatusregisterUSRfollowedbyanaccesstotheRXR
dataregister.
Bit5 FERR:Framingerrorag
0:Noframingerrorisdetected
1:Framingerrorisdetected
TheFERRagistheframingerrorag.Whenthisreadonlyagis"0",itindicates
thatthereisnoframingerror.Whentheagis"1",itindicatesthataframingerror
hasbeendetectedforthecurrentcharacter.Theagcanalsobeclearedbyasoftware
sequencewhichwillinvolveareadtothestatusregisterUSRfollowedbyanaccessto
theRXRdataregister.
Bit4 OERR:Overrunerrorag
0:Nooverrunerrorisdetected
1:Overrunerrorisdetected
TheOERRagistheoverrunerroragwhichindicateswhenthereceiverbufferhas
overowed.Whenthisreadonlyagis0,itindicatesthatthereisnooverrunerror.
Whentheagis1,itindicatesthatanoverrunerroroccurswhichwillinhibitfurther
transferstotheRXRreceivedataregister.Theagisclearedbyasoftwaresequence,
whichisareadtothestatusregisterUSRfollowedbyanaccesstotheRXRdata
register.
Bit3 RIDLE:Receiverstatus
0:Datareceptionisinprogress(databeingreceived)
1:Nodatareceptionisinprogress(receiverisidle)
TheRIDLEagisthereceiverstatusag.Whenthisreadonlyagis0,itindicates
thatthereceiverisbetweentheinitialdetectionofthestartbitandthecompletion
ofthestopbit.Whentheagis1,itindicatesthatthereceiverisidle.Betweenthe
completionofthestopbitandthedetectionofthenextstartbit,theRIDLEbitis1
indicatingthattheUARTreceiverisidleandtheRXpinstaysinlogichighcondition.