基于单片机的红外通信系统设计(主程序代码)
无需注册登录,支付后按照提示操作即可获取该资料.
基于单片机的红外通信系统设计(主程序代码)(任务书,开题报告,论文11000字,主程序代码)
摘 要
红外通信是一种利用红外线进行远程信息传输的通信方式 。可以传输多种信息,包括语言,文章甚至图像等。红外线通信具有容量大,保密性强,抗电磁干扰能力强等优点,被广泛应用于室内通信。但是由于其波长特性(红外光波长范围0.7μm~1mm),易受气候干扰,而且红外光无法透过不透明物体。因此,红外光不适合远距离通信或有障碍物的通信。
随着人们对通信服务质量的要求越来越高,现有的通信技术已经已经无法满足人们日益增长的需求。为了解决目前红外光通信的功耗过高、传输距离近、方向单一的缺点,本文设计一种基于的单片机红外通信系统。采用脉宽调制(PWM)技术,利用单片机控制红外模块进行电信号与红外光脉冲信号的转换,并通过单片编解码,最终达到利用红外光进行信息传输的目的。最后设计LabVIEW上位机显示红外接收和红外发送端的数据,得到信息在红外通信过程中的变化数据,分析该红外通信系统的性能。
关键词:红外通信;单片机;上位机;模块设计
Abstract
Infrared communication is a kind of communication mode using infrared ray to carry out remote information transmission. A variety of information can be transmitted, including language, articles, and even images.Infrared light is one of many invisible light.In nature, substances above absolute zero can produce infrared light.Infrared communication has many advantages, such as large capacity, strong secrecy, strong electromagnetic interference resistance and so on. It has been widely used in indoor communications.However, due to its wavelength characteristics (infrared wavelength range 0.7 m~1mm), it is susceptible to climate interference that the atmosphere will absorb and scatter infrared radiation, and infrared light can not penetrate opaque objects.Therefore, infrared light is not suitable for long distance communication or communication with obstacles.
With the increasing demand for communication service quality, the existing communication technology has been unable to meet the growing needs of people.In order to solve the disadvantages such as excessive power consumption, short transmission distance and single direction in the current infrared communication, an infrared communication system based on single chip microcomputer is designed in this paper.The system uses pulse width modulation (PWM) technology and single-chip microcomputer control module of infrared signal and infrared pulse signal conversion to achieve the purpose of information transmission by using infrared light.Finally, the LabVIEW host computer is designed to display the data of infrared receiver and infrared transmitter, and the change data of infrared communication is obtained. The performance of the infrared communication system is analyzed.
Key Words:Infrared communication;Singlechip;PC;Module design
目录
第一章 绪论 1
1.1 课题背景及意义 1
1.2国内外发展现状 1
1.3研究工作 1
第二章红外通信原理及整体设计 2
2.1 红外通信原理 2
2.2硬件电路设计 2
2.2.1 红外收发模块选择 2
2.2.2 信号源选择 2
2.2.3系统显示模块选择 3
2.3系统整体结构 4
2.4 本章小结 4
第三章 系统硬件电路设计 6
3.1 微控制器模块 6
3.2 SW-1801P震动传感器模块 6
3.2.1 震动传感器原理图 6
3.3 NEC红外编解码模块 7
3.3.1 NEC红外编解码模块电路图 7
3.3.2 NEC红外通信协议 8
3.3.3 PWM调制与解调 8
3.4 本章小结 9
第四章 系统软件程序设计 10
4.1 C语言程序设计 10
4.2 主要子程序流程 11
4.2.1 震动频率读取子函数 11
4.2.2 NEC红外通信发送指令程序 11
4.3 LabVIEW上位机设计 12
4.4 本章小结 15
第五章 实物演示 16
5.1 系统实物连接 16
5.2 系统工作状态 16
5.3 系统误差分析 17
第六章 总结 19
参考文献 20
致谢 21