基于单片机的红外自动计数器的设计

发布时间 : 星期日 文章基于单片机的红外自动计数器的设计更新完毕开始阅读

题 目 基于单片机的红外自动计数器的设计

学生姓名 葛明杰 学号 1213014128

所在学院 物理与电信工程学院

专业班级 电子1205班

完成地点 物理与电信工程学院实验室

2016

年5月30日

陕西理工学院毕业设计

基于单片机的红外自动计数器的设计

作者:葛明杰

(陕西理工学院物理与电信工程学院电子信息工程专业1205班,陕西 汉中 723000)

指导教师:王婷

【摘要】在当今社会飞速发展的格局下,越来越多的流水线上的产品和各种商业场合的人员需要进行自动计

数.基于单片机构成的产品自动计数器有直观和计数精确的优点,目前已在各种行业中普遍使用。本文所设计的计数器是采用红外对射方式,抗干扰性好,可靠性高。

本设计应用单片机STC89C51芯片作为核心,4位LED数码管,使用LM393芯片实现红外线计数。这种实现方法的优点是电路简单,性能可靠,实时性好,操作简单,编程容易等。

本设计是利用无人或物遮挡时红外发光管发射红外线,红外接收管接收此红外线,并将其放大、整流形成低电平信号;如果有人或物挡住红外光时,接收管没有接收到红外信号,放大器将输出高电平信号,同时将这个电平信号送入单片机进行控制计数,并且使数码管显示数值。得到要统计的人或物的数量。

【关键词】单片机;红外对射管;LM393; LED数码管;STC89C51

陕西理工学院毕业设计

The design of infrared automatic counter based on

microcontroller

Author: GeMingJie

(Grade 12,Class 5,Major electronics and information engineering,School of Physics and Electronic

Information Engineering,Shaanxi University of Technology,Hanzhong 723000,Shaanxi)

Tutor: Wang Ting

Abstract:Rapid development in the pattern of today's society, an increasing number of products on pipeline and a variety of business occasions need to automatically count. Based on SCM products constitute automatic counter has the advantages of intuitive and accurate count, now in a variety of commonly used in industry. This article is designed to counter radio-style method using infrared, interference immunity and high reliability.

The STC89C51 microcontroller chip design applications as a core, 4 LED digital tube, the use of infrared LM393 chip count, and add the alarm function. This implementation method has the advantage of simple circuit, reliable, real-time, simple operation, easy programming and so on.

The design of the guiding idea is to use infrared emission infrared LED, infrared receiver to receive the infrared, and enlarge, forming high commutation signal. When persons or block infrared light, the receiver does not receive infrared control signals, the amplifier the output low, while the level control signal into the microcontroller counts, and by decoding the digital display drive circuit values. This will be the number of persons or things to statistics.

Key words: infrared shooting tube; LM393 ; LED digital tube;STC89C51

II

陕西理工学院毕业设计

目录

第 1 章 绪论 ..................................................................................................................................... 1

1.1 课题研究的背景及意义 ................................................................................................. 1 1.2红外自动计数器国内外研究现状 ............................................................................. 1 1.3 研究主要成果及发展趋势 ........................................................................................... 1

第 2 章 红外自动计数器总体设计 .................................................................................. 4

2.1系统总体方案设计 ............................................................................................................. 4 2.2 主控芯片简介 ...................................................................................................................... 6

第 3 章 红外自动计数器的硬件设计 ............................................................................ 8

3.1单片机最小系统的设计 .................................................................................................. 8 3.2 红外线检测部分 ................................................................................................................. 8 3.3计数显示电路 .................................................................................................................... 12

第 4 章 红外自动计数器的软件设计 .......................................................................... 14

4.1 Keil C51开发系统 ....................................................................................................... 14 4.2系统软件设计流程图 .................................................................................................... 15 4.3 程序 ........................................................................................................................................ 15

第 5 章 系统调试 ......................................................................................................................... 18

5.1 系统的硬件调试 .............................................................................................................. 18 5.2 软件调试.............................................................................................................................. 18

总 结 ....................................................................................................................................................... 19 致谢 .......................................................................................................................................................... 20 参考文献 ............................................................................................................................................... 21

III

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