1253 views|0 replies

3836

Posts

19

Resources
The OP
 

Calculation and setting of baud rate of msp430 microcontroller [Copy link]

By setting three baud rate related registers, namely the baud rate integer UxBR1, UxBR0, and the baud rate trim register UxMCTL, the baud rate control parameters are calculated using the following formula: Baud rate parameter (UxBR0, UxBR1) = baud rate clock source frequency/required baud rate. (Take the integer part of the result) For example: baud rate clock source frequency = 8MHz, required baud rate = 115200, then baud rate parameters UxBR0, UxBR1 are 8000KHz/115.2KHz = 69.444444444, rounded to 69, the decimal part 0.444444444 is used as the parameter in the trim register, calculated using the following formula: Baud rate trimming parameter (UxMCTL) = 8 x decimal part (take the integer part of the result) Then, it should be 8 x 0.444444444 = 3.5, so here you can take 3 or 4, here take 4. Therefore, 4 pulse interpolation bits are required. In the UxMCTL register, after arbitrarily selecting 4 bits, UxMCTL = 0x55. Note that the interpolation pulses should be dispersed into the 8 bits of UxMCTL as much as possible. At this point, the serial port baud rate parameter settings are complete.

This post is from Microcontroller MCU
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list