文件名称: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 fr a me") 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 fr a me") 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
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 69491711usbjiekou.rar 列表 USB.doc