文件名称:USBjiekou
介绍说明--下载内容来自于网络,使用问题请自行百度
在通讯中,为了保证行运安全可靠,标准的串行口必须具有许多握手信号和
状态信息。这是因为通兜母鞲黾扑慊鶦PU速度不一样(这会导致“错帧”)以
及发送机发送数据速度比接收机接收速度快(这会导致“过冲”)。为解决这个
问题,我们采用一个简单的握手信号,即发送机每次仅发送半个字节(低4位)
的数据,而另外半个字节(高4位)则用来传送信息。我们可以对信息位(高4位)
进行如下简单的编码:
0H:发送的是新的半个字节数据
1H:重新发送上次传送错误的数据
2H:文件名结束
3H:文件结束
这样,每当发送机发送一个字节以后,就等待接受机发回送信号,这回送信号就
是发送机发送过来的那个字节。发送机接收到回送信号后,把它与刚发送的字节
相比较,如果相同,就发送新的半个字节,否则就重新发送。新数据与旧数据通
过信息位来区分。下面就是用C语言编写控制串行口的程序。-in communications, in order to ensure safe and reliable transport firms, the standard serial I must have shook hands with many signals and state information. This is because the conduct of the mother-pocket walls flutter contented tenancy PU the same speed (which would lead to "the wrong frame") and transmitter to send data faster than fast receiver to receive (this would lead to "overshoot"). To address this problem, we have adopted a simple handshake signal that the transmitter to send only half of each byte (low 4), while the other half megabyte (four high) is used to transmit messages. The information we can place (four high), a simple code : OH : Send the new half-byte data 1H : last re-sending the wrong data transmission 2H : Name 3H end : the end of this document
状态信息。这是因为通兜母鞲黾扑慊鶦PU速度不一样(这会导致“错帧”)以
及发送机发送数据速度比接收机接收速度快(这会导致“过冲”)。为解决这个
问题,我们采用一个简单的握手信号,即发送机每次仅发送半个字节(低4位)
的数据,而另外半个字节(高4位)则用来传送信息。我们可以对信息位(高4位)
进行如下简单的编码:
0H:发送的是新的半个字节数据
1H:重新发送上次传送错误的数据
2H:文件名结束
3H:文件结束
这样,每当发送机发送一个字节以后,就等待接受机发回送信号,这回送信号就
是发送机发送过来的那个字节。发送机接收到回送信号后,把它与刚发送的字节
相比较,如果相同,就发送新的半个字节,否则就重新发送。新数据与旧数据通
过信息位来区分。下面就是用C语言编写控制串行口的程序。-in communications, in order to ensure safe and reliable transport firms, the standard serial I must have shook hands with many signals and state information. This is because the conduct of the mother-pocket walls flutter contented tenancy PU the same speed (which would lead to "the wrong frame") and transmitter to send data faster than fast receiver to receive (this would lead to "overshoot"). To address this problem, we have adopted a simple handshake signal that the transmitter to send only half of each byte (low 4), while the other half megabyte (four high) is used to transmit messages. The information we can place (four high), a simple code : OH : Send the new half-byte data 1H : last re-sending the wrong data transmission 2H : Name 3H end : the end of this document
(系统自动生成,下载前可以参看下载内容)
下载文件列表
USB.doc
www.dssz.com.txt
www.dssz.com.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.