1、 1 A 目 录 摘要.I Abstract. II 1 绪论. 1 1.1课题的研究意义 1 1.2红外通信的国内外现状 2 1.3 目前红外通信技术的应用热点 2 1.4 系统设计思路分析 3 1.5 系统设计需解决的难点要点 3 2 系统方案设计. 5 2.1系统功能设计 5 2.2系统的总体方案设计 5 2.2.1 系统的总体设计思路 . 5 2.2.2系统总体设计流程图 6 2.2.3 系统总体结构图 . 6 2.2.3 系统总体结构图 . 7 2.3系统设计所需用到的主要器件 7 2.4系统设计技巧 7 3 系统硬件设计 8 3.1 主要元器件的简单介绍和选择 8 3.1.1单片机
2、介绍及选择 8 3.1.2红外通讯编码解码芯片选择 9 3.1.3红外发射头和接收头 . 9 3.2 红外通讯系统电路设计 10 3.2.1 最小系统电路 . 10 3.2.3 按键输入电路 11 3.2.4红外编码电路及其红外发射 12 3.2.5 载波信号电路 . 12 3.2.6 解码电路及其红外接 . 13 3.2.7LCD液晶显示电路和电机电路. 13 4 系统软件设计. 16 4.1红外通讯系统软件设计的编程语言选择 16 4.2 开发环境,即编程软件的选择 17 4.3 软件设计原则 17 4.4系统软件设计 18 4.4.1主程序功能的设计及其实现 18 1 B 4.4.2 L
3、CD1602 液晶显示器软件设计 21 4.4.3矩阵键盘行列检测软件设计 22 4.4.4模拟编码芯片的编码程序设计 24 4.4.5 38KHz 载波信号调制程序 25 4.4.6 解码程序设计 . 25 4.4.7发射端与接收端的通信协议设计 28 4.4.8电机控制软件设计 28 4.5 软件抗干扰技术 29 4.6系统软件设计注意事项 29 5 调试及其系统误差分析 30 5.1软件编写及调试过程 30 5.2调试过程中遇到的问题及其解决办法 32 结论 34 参考文献 35 致谢 36 附录 37 1 I 摘要 着科学技术的发展,单片机因其高可靠性和高性价比,在智能化家用电器、 仪
4、器仪表等诸多领域内得到了极为广泛的应用。 当前单片机对家用电器控制呈现 出外型简单化、功能多样化、性能优越化的发展趋向。红外通讯是目前使用较多 的一种通讯方法。 红外线通讯装置具有体积小、 功耗低、 功能强、 成本低等特点。 在家庭生活中,录音机、音响设备、空调彩电都采用了红外通讯系统。本文简述 基于单片机的红外通讯设备在现代社会的推广使用情况和发展前景, 而系统方面 主要基于红外通讯设备的实现原理和单片机原理来设计发射即遥控器和接收端。 发射端主要包含按键输入,来控制接收端的电机运转和液晶显示器的显示; 并且 对可行性进行细致研究,综合功能用途,做出整体设计流程。 关键字:红外通讯 发射端
5、接收端 系统 1 II Abstract The development of science and technology, SCM because of its high reliability and cost-effective, in the intelligent home appliances, instrumentation and many other areas has been very widely used. The SCM appliance shows the simplistic appearance, functional diversification, s
6、uperior performance of the development trend. Infrared communication is a means of communication is the use of more. Infrared communication device has the advantages of small volume, low power consumption, strong function, low cost. In family life, tape recorders, audio equipment, air-conditioning color TV using infrared communication system. In this paper, the infrared communication equipment based on single chip microcomputer in modern society to promote the use of the situation and de