单片机红外控制发射器设计 - 图文

发布时间 : 星期五 文章单片机红外控制发射器设计 - 图文更新完毕开始阅读

基于51的多功能红外遥控器

摘 要

随着社会的发展、科技的进步以及人们生活水平的逐步提高,各种方便于

生活的遥控系统开始进入了人们的生活。传统的遥控器采用专用的遥控编码及解码集成电路,这种方法虽然制作简单、容易,但由于功能键数及功能受到特定的限制,只实用于某一专用电器产品的应用,应用范围受到限制。而采用单片机进行遥控系统的应用设计,具有编程灵活多样、操作码个数可随便设定等优点。

本设计主要应用了STC89C54单片机作为核心,以NEC红外码为主要识别的操作对象,综合应用了单片机中断系统、定时器、计数器等知识,。根据对功能按键的识别,判断出控制操作,来完成整个红外遥控接收、解码、发射的过程。

其优点硬件电路简单,体积小,软件功能灵活,性价比较高等特点,具有较高的的实用和参考价值。

关键词:单片机,红外遥控,中断,定时,计数,频率

2

基于51的多功能红外遥控器

Abstract

With the development of our society and the gradual improvement of science

and technology, various kinds of help remote control systems have began to enter people’s life. The traditional remote controllers adopt special remote control code and decode integrated circuits, though this kind of method is simply and easily, it is only the practical application of some certain special electric equipments because of the counted functional keys is counted and the restricted function, so the range of application is limited. But the remote controllers which adopt the microprocessors have many advantages such as flexible operating and unceremonious manipulative keys.

The design has used AT89C2051 microprocessor as core, integratively apply the interruptive system, timer , counter ,etc. mainly to design originally and also take the advantage of the infrared light. The remote control launcher distinguishes different operation through the control on frequency of infrared emission of light. The remote control receiver judges control operation by adopting the discerned frequency of the received infrared light to finish the whole launching and receiving course.

Its advantage is that the hardware circuit is simple, the software is with perfect function, have certain use and reference value

Keywords: Microprocessor, Infrared remote control,Interrupt,Timing,Counting,

Frequency

3

基于51的多功能红外遥控器

目 录

摘 要 ......................................................................................................................... 2 目录 ............................................................................................................................... 4 一、功能简介 ............................................................................................................... 5 二、硬件设计 ............................................................................. 错误!未定义书签。 2.1 硬件设计方案 ................................................................................................ 5 2.2单片机STC89C54及其电路 ......................................................................... 5 2.3 电源模块 ........................................................................................................ 6 2.4按键模块 ......................................................................................................... 7 2.5液晶显示模块 ................................................................................................. 8 2.6蜂鸣器模块 ..................................................................................................... 9 2.7红外接收及发射模块 ................................................................................... 10 2.8 PCB图................................................................................................... ......10

三、软件开发 .................................................................................................................11

3.1Altium Designer 6开发环境 ......................................................................... 12 3.2 NEC协议 ...................................................................................................... 12 3.3主程序 ........................................................................................................... 14 四、使用说明 ............................................................................................................. 26 参考文献 ..................................................................................................................... 30 附录 ............................................................................................................................. 31

4

基于51的多功能红外遥控器

一、功能简介

1、通过红外接收装置和对应功能按键,对矩阵按键中的不同按键实现遥控功能学习;

2、对各按键已经学习的功能进行红外解码,并将8位用户码1+8位用户码2+8位数据码+8位数据反码以16进制数,显示在LCD1602上;

3、通过各独立按键已学习的功能,对外部设备进行红外遥控; 4、在按键及红外接收成功时蜂鸣器有提示音;

二、硬件设计

2.1硬件设计方案

红外接收 矩阵键盘 单片机主控芯片 电源系统 液晶显示 红外发射 图2-1

2.2单片机STC89C54及其电路

2.2.1单片机STC89C54简介

STC89C54系列单片机是宏晶科技生产的单时钟/机器周期(1T)的单片机,是高速/低功耗/超强抗干扰的新一代8051单片机,指令代码完全兼容传统8051,但速度快8-12倍,内部集成MAX810专用复位电路。

5

联系合同范文客服:xxxxx#qq.com(#替换为@)