Rev. 1.20 120 January 23, 2015 Rev. 1.20 121 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
UCR1 register
TheUCR1registertogetherwiththeUCR2registerarethetwoUARTcontrolregistersthatareused
tosetthevariousoptionsfortheUARTfunction,suchasoverallon/offcontrol,paritycontrol,data
transferbitlengthetc.Furtherexplanationoneachofthebitsisgivenbelow.
Bit 7 6 5 4 3 2 1 0
Name UARTEN BNO PREN PRT STOPS TXBRK RX8 TX8
R/W R/W R/W R/W R/W R/W R/W R W
POR 0 0 0 0 0 0 x 0
"x
" unknown
Bit7 UARTEN:UARTfunctionenablecontrol
0:DisableUART.TXandRXpinsareasI/Oorotherpin-sharedfunctionalpins
1:EnableUART.TXandRXpinsfunctionasUARTpins
TheUARTENbitistheUARTenablebit.Whenthisbitisequalto"0",theUART
willbedisabledandtheRXpinaswellastheTXpinwillbeasGeneralPurposeI/
Oorotherpin-sharedfunctionalpins.Whenthebitisequalto"1",theUARTwillbe
enabledandtheTXandRXpinswillfunctionasdenedbytheTXENandRXEN
enablecontrolbits.
WhentheUARTisdisabled,itwillemptythebuffersoanycharacterremainingin
thebufferwillbediscarded.Inaddition,thevalueofthebaudratecounterwillbe
reset.IftheUARTisdisabled,allerrorandstatusagswillbereset.AlsotheTXEN,
RXEN,TXBRK,RXIF,OERR,FERR,PERRandNFbitswillbecleared,whilethe
TIDLE,TXIFandRIDLEbitswillbeset.OthercontrolbitsinUCR1,UCR2and
BRGregisterswillremainunaffected.IftheUARTisactiveandtheUARTENbitis
cleared,allpendingtransmissionsandreceptionswillbeterminatedandthemodule
willberesetasdefinedabove.WhentheUARTisre-enabled,itwillrestartinthe
sameconguration.
Bit6 BNO:Numberofdatatransferbitsselection
0:8-bitdatatransfer
1:9-bitdatatransfer
Thisbitisusedtoselectthedatalengthformat,whichcanhaveachoiceofeither
8-bitor9-bitformat.Whenthisbitisequalto"1",a9-bitdatalengthformatwillbe
selected.Ifthebitisequalto"0",thenan8-bitdatalengthformatwillbeselected.If
9-bitdatalengthformatisselected,thenbitsRX8andTX8willbeusedtostorethe
9thbitofthereceivedandtransmitteddatarespectively.
Note:1.IfBNO=1(9-bitdatatransfer),parityfunctionisenabled,the9thbitofdata
istheparitybitwhichwillnotbetransferredtoRX8.
2.IfBNO=0(8-bitdatatransfer),parityfunctionisenabled,the8thbitofdata
istheparitybitwhichwillnotbetransferredtoRX7.
Bit5 PREN:Parityfunctionenablecontrol
0:Parityfunctionisdisabled
1:Parityfunctionisenabled
Thisistheparityenablebit.Whenthisbitisequalto"1",theparityfunctionwillbe
enabled.Ifthebitisequalto"0",thentheparityfunctionwillbedisabled.
Bit4 PRT:Paritytypeselectionbit
0:Evenparityforparitygenerator
1:Oddparityforparitygenerator
Thisbitistheparitytypeselectionbit.Whenthisbitisequalto"1",oddparitytype
willbeselected.Ifthebitisequalto"0",thenevenparitytypewillbeselected.
Bit3 STOPS:Numberofstopbitsselection
0:Onestopbitformatisused
1:Twostopbitsformatisused
ThisbitdeterminesifoneortwostopbitsaretobeusedfortheTXpin.Whenthisbitis
equalto"1",twostopbitsareused.Ifthisbitisequalto"0",thenonlyonestopbitisused.