文章目录
软件计算波特率地址:http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSP430BaudRateConverter/index.html
MSP430怎么计算波特率在各手册都有提到,但始终不清楚,直到看了官网的一篇文章:
https://processors.wiki.ti.com/index.php/USCI_UART_Baud_Rate_Gen_Mode_Selection
假如选择时钟1MHZ,想设置9600波特率,那么
N = fBRCLK/Baudrate=1MHZ/9600=104.16666666666666
如果N大于16,那么就建议设置过采样模式(setting UCOS16=1)。
如果不设置的时候 (UCOS16=0)
那么:
UCBRx = INT(N) -> integer part of N