CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 源码下载 嵌入式/单片机编程 VHDL编程

文件名称:chuankoushoufa

  • 所属分类:
  • 标签属性:
  • 上传时间:
    2013-05-01
  • 文件大小:
    84kb
  • 已下载:
    0次
  • 提 供 者:
  • 相关连接:
  • 下载说明:
    别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容来自于网络,使用问题请自行百度

接收代码:

对接收数据的采样频率:16X9600HZ

接收代码编写思路:

首先判断起始位,没有数据传输时,起始位为“1”的状态,当有数据时起始位为“0”。因为采样的频率是通信频率的16倍,所以当连续8次(数据位正中间)采集为“0”时就认为是有数据到来。那么可以开始采集数据位,以后每隔16个脉冲采集一个数据(每个数据的正中央,不易发生畸变的部分),连续采样8次,即完成数据位的采集。最后实现串并转换。如此重复即可。(因为通信已经预约好,停止位和校验位都为“1”,不会对数据产生影响。)

发送端代码编写思路:

先判断发送闲忙,如果发送的线路空闲,便可以读入数据,读入时就对数据加起始位“0”。因为数据是并行输入的,必须按位去取,形成串行数据,这时的数据位数变为9位,再给这些数据加上校验位“1”和停止位“1”即可。最后11位数据按位输出。完成发送。

程序部分也有一定说明或注释.

-Receive code:

Sampling frequency of the received data: 16X9600HZ

Receive coding ideas:

Analyzing first start bit, the start bit is "1" state when no data is transmitted, when the data start bit is "0". Because the sampling frequency is 16 times the communication frequency, so that it is collected eight consecutive times (data bit is in the middle) to "0" when data soon. Can begin collecting data bits, a collection of data (the middle of each data after every 16 pulses, less prone to distortion of the part), 8 consecutive samples, i.e. to complete the acquisition of the data bit. Finally realize the serial-to-parallel conversion. So can be repeated. (Because the communication has an appointment, stop bits and parity bits are "1", the data will not have an impact.)

Sender coding ideas:

First determine Send Free Busy, if the transmission line is idle, you can read the data read in the data start bit "0". Because the data is parallel input, serial data bit and get to form, when the nu
(系统自动生成,下载前可以参看下载内容)

下载文件列表

chuankoufasong.rar
chuankoujieshou.rar
11.bmp

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 搜珍网是交换下载平台,只提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。更多...
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或换浏览器;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*快速评论: 推荐 一般 有密码 和说明不符 不是源码或资料 文件不全 不能解压 纯粹是垃圾
*内  容:
*验 证 码:
搜珍网 www.dssz.com