尊敬的先生/女士。我需要一个简单的程序用于波特分频器程序 [英] Respected sir / madam . I need one simple program for baud divider program

查看:90
本文介绍了尊敬的先生/女士。我需要一个简单的程序用于波特分频器程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的先生/女士;



我想将波特率除以2400(2400/8)并将每位发送到300波特。



2400/8 = 300。这300波特发送到1位,最多8位。



所以请寄给我我的工作代码...请帮助...



我尝试了什么:



我想将波特率除以2400(2400/8) )并将每个位发送到300波特。



2400/8 = 300。这300波特发送到1位,最多8位。

Respected Sir / Madam;

I want to divide my Baud rate 2400 ( 2400 / 8 ) and sent each bit to 300 Baud.

2400/8 = 300 . This 300 Baud send to 1 bit , upto 8 bit.

So kindly send me code for my work ... pls pls...

What I have tried:

I want to divide my Baud rate 2400 ( 2400 / 8 ) and sent each bit to 300 Baud.

2400/8 = 300 . This 300 Baud send to 1 bit , upto 8 bit.

推荐答案

你不能 - 串口不能那样工作,因为串口数据不能像那个。

当你发送一个字符时,它会作为一个格式化的包出现,它包括一个起始位(总是一个零),5,7或8个数据位,一个可选的奇偶校验位,然后1,1,1 / 2或2个停止位(总是一个)。如果您的端口配置为2400波特,那么您无法传输导致其看起来像300波特数据的数据,因为您无法强制它将启动和停止位延长8倍。



您想发送300波特数据吗?将您的端口设置为300波特。
You can't - serial ports don't work like that because serial data doesn't work like that.
When you send a character, it goes out as a "formatted package" which consists of a Start Bit (always a zero), 5, 7 or 8 data bits, an optional Parity Bit, then 1, 1 1/2, or 2 Stop Bits (always a one). If your port is configured to 2400 baud, then you cannot transmit data which causes it to "look like" 300 baud data because you can't "force" it to lengthen the start and stop bits by a factor of eight.

You want to send 300 baud data? Set your port to 300 baud.


Quote:

所以请将代码发给我工作.. 。请点...

So kindly send me code for my work ... pls pls...





我们也不做订购代码 - 如果你想要,请去RentACoder



we also don't do code to order - if you want that, go to RentACoder


引用:

我想将波特率除以2400(2400/8)并将每个位发送到300波特。 />
2400/8 = 300。这300波特发送到1位,最多8位。

所以请寄给我我工作的代码...请帮助...

I want to divide my Baud rate 2400 ( 2400 / 8 ) and sent each bit to 300 Baud.
2400/8 = 300 . This 300 Baud send to 1 bit , upto 8 bit.
So kindly send me code for my work ... pls pls...



您的问题没有意义。看起来比你不了解串行通信的基础知识。

你问的不存在。没有什么可以划分一些波特来获得一些波兹。

你应该有一个很好的关于这个主题的讲座。


Your question is no sense. It appear than you don't understand the basics of serial communication.
What you ask just do not exist. There is nothing like divide some bauds to get some bauds.
You should have a good lecture on the subject.


这篇关于尊敬的先生/女士。我需要一个简单的程序用于波特分频器程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆