【正文】
t for a number of key capabilities may be limited, which can only be used for a particular electrical equipment, and thus its scope of application has been greatly restrictions. Using the remote control system of the singlechip design, with a flexible programming, and operation code number can be set, etc. This design uses AT89C52 as the main chip, decoding and execution of remote operation responsible for the infrared data。 關(guān)鍵詞: 單片機(jī); AT89C52;紅外遙控;步進(jìn)電機(jī) Microcontrollerbased Infrared Remote Control System Design ABSTRACT With the development of science and technology as well as improvement of living standards, a variety of remote control equipment slowly perated into every aspect of people39。而采用單片機(jī)進(jìn)行設(shè)計(jì)的遙控系統(tǒng),具有編程靈活多樣、操作碼個(gè)數(shù)可以隨意設(shè)定等優(yōu)點(diǎn)。 基于單片機(jī)的紅外遙控系統(tǒng)設(shè)計(jì) 摘 要 隨著科技的發(fā)展以及人們生活水平的提高,各種遙控設(shè)備慢慢滲透到人們生活的方方面面,這些遙控設(shè)備極大的方便了人們的生活。傳統(tǒng)的遙控器采用專用的編碼和解碼的集成電路芯片,這種電路雖然制作簡(jiǎn)單,但是用于其鍵數(shù)功能受到限制,只能用于某一特定的電器設(shè)備,因而其應(yīng)用范圍受到很大限制。 本設(shè)計(jì)采用 AT89C52 作為主控芯片,負(fù)責(zé)紅外數(shù)據(jù)的解碼和執(zhí)行遙控操作;紅外信號(hào)采用市場(chǎng)上現(xiàn)有的遙控器產(chǎn)生,它使用的編 碼芯片是 HS6221, 采用 NEC 編碼方式;一體化紅外接收頭 HS0038 負(fù)責(zé)紅外信號(hào)的接收和反向、放大等初步處理;為了更直觀的觀察紅外遙控效果,本系統(tǒng)還增加了數(shù)碼管來顯示接收到的紅外數(shù)據(jù);使用 28BYJ48型 步進(jìn)電機(jī)作為紅外信號(hào)的最終操控的對(duì)象,利用遙控器發(fā)射不同的數(shù)值,實(shí)現(xiàn)對(duì)步進(jìn)電機(jī)轉(zhuǎn)速的控制。s lives, these remote control devices, great convenience to people39。 infrared signal using the remote control available on the market that had been produced, it uses the encoding chip HS6221 that using NEC encoding。 more intuitive observation of infrared remote control effect, the system also adds a digital control to display the received infrared data。 AT89C52。 Stepper motor 目 錄 第一章 緒論 ..................................................................................................... 1 紅外遙控系統(tǒng)的簡(jiǎn)介 .................................................................................................... 1 紅外遙控技術(shù)的發(fā)展 .................................................................................................... 1 紅外遙控技術(shù)的特點(diǎn) .................................................................................................... 1 紅外遙控技術(shù)的發(fā)展前景 ............................................................................................ 2 課題的意義 .................................................................................................................... 2 第二章 單片機(jī)的工作原理 .............................................................................. 3 AT89C52 的簡(jiǎn)介 ............................................................................................................. 3 AT89C52 的功能特性 ..................................................................................................... 3 AT89C52 的引腳功能 ..................................................................................................... 3 單片機(jī)最小系統(tǒng) ............................................................................................................ 5 單片機(jī)的中斷系統(tǒng) ........................................................................................................ 7 第三章 紅外發(fā)射和接收基本原理 ................................................................. 10 紅外發(fā)射系統(tǒng)的原理 .................................................................................................. 10 紅外發(fā)射芯片 HS6221 ...................................................................................... 11 紅外信號(hào)的數(shù)據(jù)格式 ........................................................................................ 12 位定義 ................................................................................................................ 13 紅外信號(hào)解碼的基本原理 .......................................................................................... 13 第四章 系統(tǒng)方案的硬件電路設(shè)計(jì) ................................................................. 15 設(shè)計(jì)思路 ........................................................................................................................ 15 紅 外接收模塊的設(shè)計(jì) .................................................................................................... 15 步進(jìn)電機(jī)模塊的設(shè)計(jì) .................................................................................................. 17 數(shù)據(jù)顯示模塊的設(shè)計(jì) .................................................................................................. 19 第五章 程序設(shè)計(jì) ............................................................................................ 22 設(shè)計(jì)思路 ....................................................................................................................... 22 數(shù)據(jù)采集程序的設(shè)計(jì) .................................................................................................. 22 數(shù)據(jù)提取程序的設(shè)計(jì) .................................................................................................. 23 數(shù)碼管顯示程序的設(shè)計(jì) .............................................................................................. 25 步進(jìn)電機(jī)驅(qū)動(dòng)程序的設(shè)計(jì) .......................................................................................... 27 第六章 硬件系統(tǒng)的實(shí)驗(yàn) ................................................................................... 29 實(shí)驗(yàn)一 .......................................................................................................................... 29 實(shí)驗(yàn)二 .......................................................................................................................... 31 第七章 總結(jié) ...................................................................................................... 33 參考文獻(xiàn) ............................................................................................................ 34 附錄 A ................................................................................................................ 35 附錄 B ................................................................................................................ 36 附錄 C ...............................................................................................