msp-uart-57600.txt
来自「MSP430 //示范使用三种不同时脉来源 // Enter LPM3 w/」· 文本 代码 · 共 27 行
TXT
27 行
/* uart calculator: http://mspgcc.sourceforge.net/baudrate.html this program license is at: http://www.fsf.org/licenses/licenses.html#GPL this program is distributed WITHOUT ANY WARRANTY clock: 2500000Hz desired baud rate: 57600bps division factor: 43.4 effective baud rate: 57603.7bps maximum error: 0.2388us 1.38% time table (microseconds): event desired effective error error% startbit->D0 17.36 17.60 -0.239 -1.38 D0->D1 34.72 34.80 -0.0777 -0.45 D1->D2 52.08 52.00 +0.0833 +0.48 D2->D3 69.44 69.60 -0.155 -0.90 D3->D4 86.81 86.80 +0.0055 +0.03 D4->D5 104.17 104.40 -0.233 -1.34 D5->D6 121.53 121.60 -0.0722 -0.42 D6->D7 138.89 138.80 +0.0888 +0.51 D7->stopbit 156.25 156.40 -0.15 -0.86 end of stopb 173.61 173.60 +0.0111 +0.06*/UBR00=0x2B; UBR10=0x00; UMCTL0=0x29; /* uart0 2500000Hz 57603bps */UBR01=0x2B; UBR11=0x00; UMCTL1=0x29; /* uart1 2500000Hz 57603bps */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?