{$cfg_webname}
主页 > 电子信息 > 单片机 >

基于单片机的红外遥控系统的设计(附程序代码)

来源:56doc.com  资料编号:5D4881 资料等级:★★★★★ %E8%B5%84%E6%96%99%E7%BC%96%E5%8F%B7%EF%BC%9A5D4881
资料以网页介绍的为准,下载后不会有水印.资料仅供学习参考之用. 帮助
资料介绍

基于单片机的红外遥控系统的设计(附程序代码)(任务书,开题报告,中期报告,毕业论文,17000字,程序代码)
摘  要
如今,利用红外遥控传输较小的数据量来控制电器设备的应用已经非常广泛,对各种红外遥控器发出来的红外编码进行采集和处理就成了众人非常关心和急需解决的问题。仔细分析了多种遥控器所发红外编码的特点及其规律,详细地阐述了利用单片机系统对家用电器遥控器发出来的红外编码进行学习、存储、传输和再生的原理,来实现以红外线为传送信息媒介的短距离红外遥控控制电路,具有准确度高、速度快的特点。在了解了其发射的编码脉冲信号波形后,设计了基于单片机的红外遥控器解码器,对解码器硬件和相应软件进行分析并给出程序流程图,给出多功能遥控系统框图,详细地说明其硬件组成原理和各个部分的功能,并给出了部分程序流程图。本设计以单片机为核心设计一种红外线遥控系统,可以对各种红外线遥控器发射的信号进行识别、存贮和再现等功能,从而实现对各类家电的控制。

关键词:红外遥控器,单片机,编码,解码,信号
 
ABSTRACT
Today, the application, using infrared telecontrol to transmit a few data to control electric equipment, is so popularized. The problem, picking and processing the infrared code which sent by the various telecontroller, being watched out and solved eagerly by many people. We analyzed carefully the characteristic and its law of the infrared code which sent by the kinds of telecontroller. The principle, using the singlechip system to learn, store, transmit and restore the infrared code which sent by the telecontroller of electric appliance, is also detailedly expounded in this paper. By guiding of the principle, which take the infrared as the pass-along message medium short distance wireless remote control circuit, which has the accuracy to be high, the speed quick characteristic. After thecode pulse signal waveshape that infrared remote controller emits is known, the decoder of infrared remote controller based on single chip microcomputer is designed, the decoder hardware and appropriate software are analysed and the program process diagrams are given. The paper puts forward frame diagram of multifunction remote control system and detailed the compose of hardware principle and function of each part, and gives part of program flu diagrams. This is to design an intelligent infrared remote focusing on single chip. It can distinguish, store and recurrence to signals that all kinds of infrared remote launched. Thereby, the control of all household electrical appliances can be realized.

Key words: infrared remote controller;single chip microcomputer;code decoder;signal

整个控制系统的设计要求
第一、被控设备的控制实时反映,从接收信号到信号处理及对设备控制反映时间应小于1s;第二、整个系统的抗干扰能力强,防止误动作;第三、整个系统的安装、操作简单,维护方便;第四、总体成本低。

红外载波、编码、解码电路设计要求
第一、单片机定时器精确产生38KHz红外载波。第二、根据控制系统要求能对红外控制指令信号精确编码并迅速发送。第三、解码的规则为先为9ms的引导码,跟着是4.5ms的结束码,再就是32位的二进制码,其中前16位为用户码,后16位为功能码,16位功能码又由8位功能码和8位功能反码组成。

红外解码电路设计要求
首先要能顺利接收红外信号,由一体化接收头内部对所接收的码进行放大、整形然后解调等处理,最后能输出二进制的码值。不能受到非红外光或其他不合要求的光的干扰,也就是抗干扰能力要强。

整体设计思路为:根据扫描到的按键值转至相对应的ROM表中读取数据,确认之后单片机将从ROM读取出来的值,按照数据处理要求从输出端输出控制脉冲与T0产生的38KHz的载波进行调制,再经三极管将信号放大并驱动红外发光管将控制信号发送出去。红外数据接收则是采用PC3388一体化接收头,北部可以完成红外接收、数据采集、解码的功能。只要在接收端接侧头信号低电平的到来,就可以完成对整个串行的信号进行分析得出当前控制指令的功能。

本设计包括两大模块:红外发射模块和红外接收模块。
通过发射模块发出红外信号编码,编码加载在38KHz载波上发射出去,红外接收模块接收信号并滤除载波,并传回单片机内进行解码。其中,红外接收模块的接收头用的是PC3388型号的一体化接收头,可以对信号进行放大解调等操作,然后通过单片机进行译码。
用的单片机是STC89C52RC,通过红外线接收模块接收信号,由于接收模块有自动滤除载波功能,所以红外接收模块解得的码就是遥控器发射的编码,通过电路传到单片机内。

基于单片机的红外遥控系统的设计(附程序代码)
基于单片机的红外遥控系统的设计(附程序代码)
基于单片机的红外遥控系统的设计(附程序代码)
基于单片机的红外遥控系统的设计(附程序代码)

推荐资料