基于单片机的视力保护器电路的设计 下载本文

基于单片机的视力保护器电路的设计

摘要:如今这个时代被人们称为信息时代,这些年,计算机技术以不可阻挡之势迅猛发展,在工业、农业、国防、医疗、科研等众多领域发挥着重要的作用,成为各国衡量其国际竞争力的重要标准之一。单片机有着优越的控制能力,在工业控制、医疗控制,只能仪表等领域有着广泛的应用,更以有着无比的优越性从而成了微型的计算机的一个非常重要的分支。

本文主要介绍了单片机的发展概况和视力保护器的发展历程,利用单片机AT89C51设计一款性能优越的视力保护器。在AT89C51型单片机的硬件设施基础上实现测距、感光、定时、报警四大功能。其中测距模块和感光模块主要是由相应的传感器组成,实现对使用者距离和周围环境光线强度的检测和报警功能。定时模块是由单片机的运行程序构成,实现对使用者学习时间的监测和提示功能。介绍了利用Keil平台实现定时汇编语言的方法。同时也简单介绍了该技术的应用现状和发展前景。

关键词:单片机;传感器;定时器;Keil

1

Vision protector circuit design based on

single chip microcomputer

Abstract:Now this era known as the information age, these years, the technology of the computer to the irresistible trend of rapid development,and plays an important role in many fields of industry, agriculture,national defense, medical, scientific research, become one of the most important standards to measure the international competitiveness of the countries.Single chip microcomputer as an important branch of microcomputer, with its superior control function, in the industrial control, intelligent instrument system is showing its superiority.

This paper mainly describes the present situation of the development of the single chip microcomputer and the development of vision protector, using single-chip microcomputer AT89C51 design a superior performance vision protector. On the basis of type AT89C51 single chip microcomputer hardware implementation ranging, photographic, timing,alarm, four big functions. The ranging module and photosensitive module is mainly composed of the corresponding sensor, realize the user distance and ambient light intensity detection and alarm function. Timing module is made up of single chip microcomputer to run the program, implementation of the user study time monitoring and prompt functions. Introduced the method of using Keil platform implementation timing assembly language. At the same time also simply introduces the present situation of the application of the technology and development prospects.

Key words: Single chip microcomputer;transducer;timer;keil

2

目录

1.绪论..........................................................1 1.1 选题背景............................................1

1.2 视力保护器的现状及其展望............................2 1.3 主要研究内容........................................2

2.系统硬件设计.............................................4 2.1 8051单片机简介......................................4 2.2 传感器辅助坐直报警电路..............................7 2.3 8051单片机的中断系统.................................8 2.3.1中断的概念...................................8 2.3.2中断系统结构以及中断控制.....................9 2.3.3中断响应及中断处理过程......................12 2.4 光线报警电路.......................................13 2.4.1光敏电阻控制电路..........................13 2.4.2光线发声报警电路..........................13 2.5 定时报警电路.......................................14 2.5.1单片机控制电路............................14 2.5.2定时器报警发声电路........................15 3. 开发系统软件设计.......................................16 3.1 Keil C51软件简介....................................16 3.2程序的模块化划分....................................16 3.3程序模块............................................18 3.3.1超声波测距模块............................18 3.3.2外部中断模块..............................19 3.3.3定时模块..................................20 4. 结论及展望.............................................22 参考文献.......................................................23 附录.........................................................24

I