1553 views|0 replies

1140

Posts

0

Resources
The OP
 

TI MSP430 series microcontroller serial communication baud rate calculation method [Copy link]

TI MSP430 series microcontroller, the baud rate value of the usart module is determined by the following three registers: UxBR0, UxBR1, UxMCTL Baud rate = BRCLK/N, mainly to calculate N. BRCLK: clock source, which can be set as the clock source through the register; through the SSEL two bits of the register UCAxCTL1, 01: ACLK, 02: SMCLK N: The frequency division factor generated by the baud rate. N=UxBR1+UxBR0+UxMCTL, where UxBR1+UxBR0 is the integer part, UxMCTL is the set decimal part, where UxBR1 is the high bit, UxBR0 is the low bit, and the two are combined into a 16-bit word. For example: baud rate = 115200, clock source = 8MHz, external crystal oscillator N = 8000000/115200 = 69.44. Obviously: UxBR1 + UxBR0 = 69, that is, UxBR1 = 0, UxBR0 = 0x45, first round the decimal part 0.44 × 8, that is, 3.52, to 3. This 3 means that there must be 3 1s in the 8 bits in UxMCTL, and UxMCTL is divided into First Stage Modulation and Second Stage Modulation, that is, the former is the upper 4 bits, with a value range of 0-F, and the latter is the lower 4 bits. Note that the latter 4 bits are preferably even numbers. The rounded value of the decimal part obtained in the previous step is distributed to the high and low bits, such as 3, which can be written as 0x16.

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

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building, Block B, 18 Zhongguancun Street, Haidian District, Beijing 100190, China Tel:(010)82350740 Postcode:100190

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