还是少用非标波特率吧 本帖最后由 jmg 于 2024-5-10 10:32 编辑
USB needs a 48MHz clock, so most USB_UARTS have BAUD = 24MHz/N (or similar, some have 96MHz/N)
24M/921600 = 26.04166667 /26 is OK (0.16%)
24M/691200 = 34.72222222 larger error 0.8% from nearest odd number, 2.12% from nearest even number.
24M/460800 = error 52.083333 33 /52 is ok (0.16%)
When I ask for 691200 on my USB_UART, I measure appx = 666600 Baud
24M/36 = 666667 Baud
Suggestion: if you choose a sysCLK related to 24MHz, you should be able to support any baud rate the USB-UARTs can.
晓飛飛 发表于 2024-5-9 10:07
既然是通信,那对通信双方的能力都需要有了解,691200bps并非常用的标准波特率,比如CH340甚至最新的CH343 ...
{:4_250:} jmg 发表于 2024-5-10 07:29
USB needs a 48MHz clock, so most USB_UARTS have BAUD = 24MHz/N (or similar, some have 96MHz/N)
24M ...
谢谢 激流 发表于 2024-5-8 10:22
STC侧691200波特率误差为0,很大可能是对方这个波特率误差可能太大,而对方其他波特率误差小。
波特率误差要看双方,双方都是正误差或都是负误差,综合下来误差“容忍度”就高了。
页:
1
[2]