RS232
来源:互联网 发布:五十音图 软件 编辑:程序博客网 时间:2024/05/21 22:41
RS232的最大的传输速率大约10KBytes/s。
全双工工作方式,异步。数据是8位作为一块来发送的,先发送最低位,最后发送最高位。
在232通信中:
- Both side of the cable agree in advance on the communication parameters (speed, format...). That's done manually before communication starts.
- The transmitter sends "idle" (="1") when and as long as the line is idle.
- The transmitter sends "start" (="0") before each byte transmitted, so that the receiver can figure out that a byte is coming.
- The 8 bits of the byte data are sent.
- The transmitter sends "stop" (="1") after each byte.
通信中有关时钟速率能不能设置成任意速率的问题,答案是不能,只能设置特定的速率。
- 1200 bauds.
- 9600 bauds.
- 38400 bauds.
- 115200 bauds (usually the fastest you can go).
At 115200 bauds, some PCs with buggy chips require a "long" stop bit (1.5 or 2 bits long...) which make the maximum speed drop to around 10.5KBytes per second.
就是说在115300的波特率下,有的电脑最大的速度可能是11.5KBytes/s或者10.5KBytes/s.
电压所代表的值:
- "1" is sent using -10V (or between -5V and -15V).
- "0" is sent using +10V (or between 5V and 15V).
为了最容易的产生波特率1.8432Mhz的晶振是个好的选择,当除以16就是115200hz。
有关波特率的计算方法:
假如,手上的板子上晶振2M,想要115200的波特率,那在FPGA上的实现方法是先计算出tick多少次,2000000/115200次,这个式子表示的就是分频多少次(从2M变成115200要进行多少分频,就是原先的时钟变换多少次,现在的始终才变换一次)。然后简化出1024/59次,出现1024后较方便实现。
reg [10:0] acc; // 11 bits total!
always @(posedge clk)
acc <= acc[9:0] + 59; // use only 10 bits from the previous result, but save the full 11 bits
wire BaudTick = acc[10]; // so that the 11th bit is the carry-out
在用上位机打开串口的时候,发送端会有1.5s的低电平,然后恢复成高电平。
- RS232
- RS232
- RS232
- RS232
- RS232
- RS232
- RS232
- RS232
- RS232
- RS232
- RS232
- RS232
- RS232 RS484
- RS485 RS232
- RS232 / RS485
- Rs232详细
- RS232编程
- RS232相关内容
- Android NDK编译本地文件以及引用第三方so文件
- [Vim]Mac下如何安装ctags、Exuberant Ctags、以及出现E433: No tags file的解决方法
- 下载并编译CyanogenMod源代码
- org.dom4j
- 算法重拾之路——合并排序
- RS232
- Linux下安装maven
- 数据结构:图论基础
- 1411122215-ny-Financial Management
- IOS学习时的一些笔记(一)
- XMPP协议实现原理介绍
- 【二分答案】POJ-2109 Power of Cryptography
- 关于SqlServer 视图容易犯错的两个地方
- UVA--531 Compromise