EasyManua.ls Logo

Holtek HT66F30 - Page 249

Default Icon
294 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. 2.50 248 June 22, 2017 Rev. 2.50 249 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
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 × × × × × × × ×
“×” 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.
UART Module Setup and Control
Fordatatransfer,theUARTfunctionutilizesanon-return-to-zero,morecommonlyknownasNRZ,
format.Thisiscomposedofonestartbit,eightorninedatabitsandoneortwostopbits.Parity
issupportedbytheUARThardwareandcanbesetuptobeeven,oddornoparity.Forthemost
commondataformat,8databitsalongwithnoparityandonestopbit,denotedas8,N,1,isused
asthedefaultsetting,whichisthesettingatpower-on.Thenumberofdatabitsandstopbits,along
withtheparity,aresetupbyprogrammingthecorrespondingBNO,PRT,PRENandSTOPSbitsin
theUCR1register.Thebaudrateusedtotransmitandreceivedataissetupusingtheinternal8-bit
baudrategenerator,whilethedataistransmittedandreceivedLSBrst.Althoughthetransmitter
andreceiveroftheUARTarefunctionallyindependent,theybothusethesamedataformatandbaud
rate.Inallcasesstopbitswillbeusedfordatatransmission.
• Enabling/DisablingtheUART
Thebasicon/offfunctionoftheinternalUARTfunctioniscontrolledusingtheUARTENbitin
theUCR1register.IftheUARTEN,TXENandRXENbitsareset,thenthesetwoUARTpins
willactasnormalTXoutputpinandRXinputpinrespectively.Ifnodataisbeingtransmittedon
theTXpin,thenitwilldefaulttoalogichighvalue.
ClearingtheUARTENbitwilldisabletheTXandRXpinsandthesetwopinswillbeinthe
stateofhighimpedance.WhentheUARTfunctionisdisabled,thebufferwillberesettoan
emptycondition,atthesametimediscardinganyremainingresidualdata.DisablingtheUART
willalsoresettheenablecontrol,theerrorandstatusagswithbitsTXEN,RXEN,TXBRK,
RXIF,OERR,FERR,PERRandNFbeingclearedwhilebitsTIDLE,TXIFandRIDLEwillbe
set.TheremainingcontrolbitsintheUCR1,UCR2andBRGregisterswillremainunaffected.
IftheUARTENbitintheUCR1registerisclearedwhiletheUARTisactive,thenallpending
transmissionsandreceptionswillbeimmediatelysuspendedandtheUARTwillberesettoa
conditionasdenedabove.IftheUARTisthensubsequentlyre-enabled,itwillrestartagainin
thesameconguration.

Table of Contents

Other manuals for Holtek HT66F30

Related product manuals