TI中文支持网
TI专业的中文技术问题搜集分享网站

msp430f5438 串口uart0通信,18.432MHz, 波特率38400,UCA0MCTL和UCA0BR0、UCA0BR1怎么设置

如题,求高手指点。对datasheet中关于波特率设置的部分有些疑问,其中round是指?

Low-Frequency Baud Rate Mode Setting In the low-frequency mode, the integer portion of the divisor is realized by the prescaler:

UCBRx = INT(N)

and the fractional portion is realized by the modulator with the following nominal formula:

UCBRSx = round( ( N – INT(N) ) ´ 8 )

Incrementing or decrementing the UCBRSx setting by one count may give a lower maximum bit error for any given bit. To determine if this is the case, a detailed error calculation must be performed for each bit for each UCBRSx setting.

Oversampling Baud Rate Mode Setting In the oversampling mode the prescaler is set to:

UCBRx = INT(N/16)

 and the first stage modulator is set to: UCBRFx = round( ( (N/16) – INT(N/16) ) ´ 16 )

When greater accuracy is required, the UCBRSx modulator can also be implemented with values from 0 to 7. To find the setting that gives the lowest maximum bit error rate for any given bit, a detailed error calculation must be performed for all settings of UCBRSx from 0 to 7 with the initial UCBRFx setting and with the UCBRFx setting incremented and decremented by one.

 

Leon Yan:

你好:

这个round的意思是对括号里面的数进行四舍五入运算。

谢谢。

赞(0)
未经允许不得转载:TI中文支持网 » msp430f5438 串口uart0通信,18.432MHz, 波特率38400,UCA0MCTL和UCA0BR0、UCA0BR1怎么设置
分享到: 更多 (0)