(完整版)基于51单片机的9999秒倒计时器毕业设计论文
- 格式:doc
- 大小:4.94 MB
- 文档页数:99
编号:
审定成绩:
重庆邮电大学
毕业设计(论文)
设计题目:基于51单
片机的9999秒倒计时器设计
学院名称:通信与信息工程学院
学生姓名:X正伟
专业:电子信息工程班级:0120XXX 学号:060201XX 指导教师:刘XX
答辩组负责人:
填表时间:2010 年 6 月
重庆邮电大学教务处
摘要
近年来随着计算机在社会领域的渗透,单片机的应用正在不断地走向深入,同时带动着传统控制检测日新月异的更新。由于单片机具有体积小、易于产品化、面向控制、集成度高、功能强、可靠性高、价格低等特点,其在工业控制、机电一体化、智能仪表、通信等诸多领域中得到了广泛的应用。在实时检测和自动控制的单片机应用系统中,单片机往往是作为一个核心部件来使用。但是仅单片机方面知识是不够的,还应根据具体硬件结构,以及针对具体应用对象特点的软件结合,以作完善。
本论文针对倒计时系统的设计的需求,介绍了MCS-51单片机的部分基本原理,如51单片机的接口功能、中断、定时器等等。倒计时系统需要用到锁存器、矩阵键盘、LED数码显示器等主要模块,通过不同的模块之间相互作用,完成倒计时的初步硬件结构。对于倒计时器中的LED 数码显示器来说,我为了简化线路、降低成本,采用以软件为主的接口方法,即采用Keil uVision3软件程序进行译码。
本次设计采用C语言编程,通过倒计时子程序模块、矩阵键盘扫描模块、中断等子程序的正确调用,完成了可以随时设置初值的基于51单片机控制的9999秒倒计时系统。
【关键词】倒计时器单片机矩阵键盘Keil uVision3 LED数码显示器
ABSTRACT
In recent years, with the penetration of computers in the social sphere, SCM applications are continually deepening, and the traditional control test is driving the rapid update. The size of SCM is very small, and it is easy to be producted. for control, , functionality, . So it widely used in the area of industrial control, mechatronics, intelligent instruments and communications.In real-time detection and control of the microcomputer application system, the microcontroller is often used as a core component. But if only specific -specific features of the software objects are combined will be perfect.
This paper focuses on the needs of the countdown system design, introduced the MCS-51 MCU of some of the basic principles.Such as the 51 single-chip interface functions, interrupt, timer and so on. Countdown system needs to use latch, matrix keyboard, LED digital display and other major modules, through interaction between different modules to complete the Countdown to the initial device in the LED digital display, In order to simplify the circuit, reduce costs, we adopt a software-based interface method, namely using Keil uVision3 software program for decoding.
C language programming was used in the design , we completed the initial value can be set at any time based on 51 single-chip control of the 9999 seconds countdown system by making use of the countdown subroutine modules, matrix keyboard scanning module, interrupt, and also the correct subroutine calls.
【Key words】Counter-down SCM Matrix keyboard Keil uVision3 LED digital display
目录
前言......................................................................................................................................................第一章倒计时系统简介 ......................................................................................................................
第一节功能说明...............................................................................................................
一、设计要求............................................................................................................
二、方案说明............................................................................................................
三、系统功能............................................................................................................
第二节开发作用和意义.................................................................................................
第三节本章小结 .............................................................................................................第二章MCS-51单片机基本原理.....................................................................................................
第一节单片机概述 .........................................................................................................
一、单片机基础........................................................................................................
二、单片机应用领域................................................................................................
三、单片机的生产厂家和机型 ...............................................................................
第二节MCS-51单片机的组成原理..............................................................................
一、80C51芯片介绍................................................................................................
二、8051 与80C51.....................................................................................................
第三节MCS-51单片机的引脚功能..............................................................................
一、主电源引脚Vss和Vcc ....................................................................................
二、外接晶体引脚XTAL1和XTAL2...................................................................
三、控制引脚RSTVPD、ALEPROG、PSEN、EA Vpp ....................................
四、输出输入引脚....................................................................................................
第四节中断 .....................................................................................................................
一、中断的概念........................................................................................................