XWF1890 发表于 2023-4-29 03:47:51

串口需要采样,但定时器计数好象不需要采样的,因此对波特率公式中的“4”还是不理解,我再试试,谢谢

dbkdz 发表于 2023-7-7 22:30:43

用22.1184晶振,用单片机精灵,能很精确算出T2定时值的。115200我也用。后来我发现用STC12系列用11.0592晶振用1T模式,也能产生115200波特率来用{:4_165:}

32G12K128 发表于 2023-7-10 11:49:00


STC最新的下载软件上也有波特率从计算器,可以参考这个帖子:
STC-ISP下载软件贴心工具: 波特率计算器,自动帮您算好 - 定时器/计内部时钟,计数器/计外部脉冲,时钟分频输出,软件延时 - 国芯论坛-STC全球32位8051爱好者互助交流社区 - STC全球32位8051爱好者互助交流社区https://www.stcaimcu.com/forum.php?mod=viewthread&tid=191&extra=page%3D1

13918210822 发表于 2023-8-4 19:20:56

请问STC8H或者STC32G支持4线串口么?最高波特率能到多少?能超过1Mbps么?谢谢!

神农鼎 发表于 2023-8-5 15:48:09

4组串口,波特率可 8M bps 以上


jmg 发表于 2023-8-7 05:16:44

13918210822 发表于 2023-8-4 19:20
请问STC8H或者STC32G支持4线串口么?最高波特率能到多少?能超过1Mbps么?谢谢! ...

The highest BAUD is Sysclk/4, but the code also needs to be able to keep up, if you want to handle many bytes.

There is no mention of handshake lines, but software control of handshake lines is possible.

Transmit from MCU will add stop bits if the MCU is unable to load bytes fast enough, and can poll a wait pin from the remote if needed.

Receive could be helped by using DMA, but then you have difficulty creating an outgoing handshake line.

Get the various UART-USB examples and test them, at higher baud speeds.

13918210822 发表于 2023-8-8 10:49:50

Thanks a Lot. that meaning remote also need support USB-CDC driver, currently remote host can run linux, so linux usb-cdc driver should be loaded first.
Maybe, USB-CDC is silver bullet for mcu like 251.
页: 1 [2]
查看完整版本: 串口波特率问题