成都理工大学工程技术学院毕业论文
基于单片机的24秒倒计器设计
作者姓名:罗强智
专业名称:电子信息工程
指导教师:石坚 讲师
基于单片机的24秒倒计时设计
摘要
近年来随着计算机在社会领域的渗透,单片机的应用正在不断地走向深入,同时带动传统控制检测日新月益更新。在实时检测和自动控制的单片机应用系统中,单片机往往是作为一个核心部件来使用,仅单片机方面知识是不够的,还应根据具体硬件结构,以及针对具体应用对象特点的软件结合,以作完善。
模拟多通道压力系统是利用压力传感器采集当前压力并放映在显示器上,它可以分析压力过量程,并发出报警。并采用电子秤原理可根据输入单价准确的计算出物体的金额。本篇论文讨论了简单的倒计时器的设计与制作,对于倒计时器中的LED数码显示器来说,我为了简化线路、降低成本,采用以软件为主的接口方法,即不使用专门的硬件译码器,而采用软件程序进行译码。
【关键词】单片机;AT89C51;LED数码管显示器;keil C;晶体振荡器
I
基于单片机的24秒倒计时设计
Abstract
Permeate in the social realm along with the calculator in recent years,single slice the application of the machine just at constantly
alignment thorough,arouse a traditional control an examination a day a new moon benefit renewal in the meantime.In solidly the hour the examination the single slice that controls with auto the machine the application the system,slice machine usually Be a core parts to use,only single slice the machine aspect knowledge is not enough,return should according to concrete the hardware structure,and aim at concrere
application the sofwatre of the object characteristics combine to make perfect.
Imitating many passage pressure systemses is to make use of presure to spread the feeling machine to collect current pressure combine the reflection is on tne display,it can analyze the pressure surfeit distance,erupting to report to the police.Combine the adoption electronics steelyard principle can according to input the amount of money that the unit price compures an object accurately.This thesis discuss that pour the design and creation of the timer in brief,for pour LED figures displays in the timer to say,I an for the sake of the
simpification circuit,decline low cost,adopt to take software as connect of lord a people’s methdo,do not use specialized hardwate to translate the code machine namely,but adopt the software procedure to carry on translating code.
【Keyword】single slice machine,AT89C51,The LEDfigure tube display,Keil C,Crystal Oscillactor
II
基于单片机的24秒倒计时设计
目录
摘要 ............................................................................................................ I Abstract ...................................................................................................... I 目录 ......................................................................................................... III 前言 ........................................................................................................... 1 第一章 原理设计 ..................................................................................... 2
1.1 设计要求 .................................................................................... 2 1.2 AT89C51芯片 ............................................................................. 2 1.3 管脚说明 .................................................................................... 5 第二章 系统总体方案的设计 ................................................................. 7
2.1硬件电路的设计 ......................................................................... 7 2.2 时钟频率电路的设计 ............................................................ 8 2.3 复位电路的设计 ........................................................................ 8 2.4显示电路的设计 ......................................................................... 8 第三章 系统软件的设计 ....................................................................... 11
3.1 定时中断的程序设计 .............................................................. 11 3.2 独立键盘服务程序的设计 .................................................... 12 3.3 显示子程序的设计 .............................................................. 12 3.4 系统软件的调试 .................................................................. 12 第四章 Proteus原理图绘制 .................................................................. 13 第五章 Proteus电路仿真与结果分析 .................................................. 14
5.1 Keil C软件 ............................................................................. 14 5.2 Proteus软件 ........................................................................... 15 第六章 系统调试及结果分析 ............................................................... 17
6.1 使用的主要仪器和调试 .......................................................... 17 6.2 系统调试 .................................................................................. 17
III
基于单片机的24秒倒计时设计
6.3 测试结果 .................................................................................. 17
总结 ......................................................................................................... 18 致谢 ......................................................................................................... 19 参考文献 ................................................................................................. 20 附件1 元件清单 .................................................................................... 21 附件2 Keil C下编写的源代码 ......................................................... 21
IV