EasyManua.ls Logo

Holtek BS82B12A-3 - Ba�D Rate Gene�Ato

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 124 January 23, 2015 Rev. 1.20 125 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
TXR_RXR register
TheTXR_RXRnregisteristhedataregisterwhichisusedtostorethedatatobetransmittedonthe
TXnpinorbeingreceivedfromtheRXnpin.
Bit 7 6 5 4 3 2 1 0
Name TXRX7 TXRX6
TXRX5 TXRX4 TXRX3 TXRX2 TXRX1 TXRX0
R/W R/W R/W R/W R/W R/W R/W R/W R/W
POR x x x x x x x x
"x
" unknown
Bit7~0 TXRX7~TXRX0:UARTTransmit/ReceiveDatabit7~bit0
Baud Rate Generator
Tosetupthespeedoftheserialdatacommunication,theUARTfunctioncontainsitsowndedicated
baudrategenerator.Thebaudrateiscontrolledbyitsowninternalfreerunning8-bittimer,theperiod
ofwhichisdeterminedbytwofactors.Therstoftheseisthevalueplacedinthebaudrateregister
BRGandthesecondisthevalueoftheBRGHbitwiththecontrolregisterUCR2.TheBRGHbit
decidesifthebaudrategeneratoristobeusedinahighspeedmodeorlowspeedmode,whichin
turndeterminestheformulathatisusedtocalculatethebaudrate.ThevalueintheBRGregister,N,
whichisusedinthefollowingbaudratecalculationformuladeterminesthedivisionfactor.Notethat
NisthedecimalvalueplacedintheBRGregisterandhasarangeofbetween0and255.
UCR2 BRGH Bit 0 1
Baud Rate (BR) f
SYS
/ [64 (N+1)] f
SYS
/ [16 (N+1)]
ByprogrammingtheBRGHbitwhichallowsselectionoftherelatedformulaandprogrammingthe
requiredvalueintheBRGregister,therequiredbaudratecanbesetup.Notethatbecausetheactual
baudrateisdeterminedusingadiscretevalue,N,placedintheBRGregister,therewillbeanerror
associatedbetweentheactualandrequestedvalue.ThefollowingexampleshowshowtheBRG
registervalueNandtheerrorvaluecanbecalculated.
BRG Register
Bit 7 6 5 4 3 2 1 0
Name BRG7 BRG6
BRG5 BRG4 BRG3 BRG2 BRG1 BRG0
R/W R/W R/W R/W R/W R/W R/W R/W R/W
POR x x x x x x x x
"x
" unknown
Bit7~0 BRG7~BRG0:BaudRatevalues
ByprogrammingtheBRGHbitinUCR2Registerwhichallowsselectionofthe
relatedformuladescribedaboveandprogrammingtherequiredvalueintheBRG
register,therequiredbaudratecanbesetup.

Table of Contents

Related product manuals