数字钟的设计_毕业设计

  • 格式:doc
  • 大小:295.50 KB
  • 文档页数:37

毕业设计

数字钟的设计

摘要:随着电子工业的发展,电子产品日新月异。钟表的数字化给人们生产生活带来了极大的方便,而且大大地扩展了钟表原先的功能。诸如数字钟、万年历、电子表、定时自动报警、定时启闭电路、通断动力设备,甚至各种定时电气的自动启用、通信、网络等众多领域,所有这些都是以钟表数字化为基础的。由于其功能的不断增加,使用方便性不断提高,很多产品已经成为人类日常生活中不可或缺的助手。

本文是基于单片机控制的数字钟系统的设计。该系统主要以单片机芯片AT89C51为核心结合按键选择模块来控制数码管显示模块和蜂鸣器模块工作,从而实现时钟和闹钟功能,并可对时钟及闹钟的时、分、秒进行单独校对,使其校正到标准时间。此设计以软件控制硬件及软硬件结合为指导思想,充分发挥单片机功能。同时,该数字钟系统还具有功耗小、成本低的特点,具有很强的实用性。由于系统实现的功能简单,因此具有一定的可扩展性。

关键词:AT89C51单片机;数码管显示;

The design of digital clock

Abstract

With the development of the electronics industry, electronic

products are different from before day by day. Watches digital

has brought great convenience to people's production and living,

and greatly expanded the original watch function. Such as digital

clock, calendar, electronic watches, timed automatic alarm, timed

to open and close circuits, open and close the power equipment,

even a variety of timed electrical auto-enabled, communications,

networking and many other fields, all of which are based on

watches digital. Increasing its functionality, ease of use continue

to increase, many products have become an indispensable

assistant to human daily life.

This article is based on single chip microcomputer control of

digital clock system design. This system mainly by the

single-chip microcomputer AT89C51 as the core in combination

with key choice module to control the digital tube display and

buzzer module work, so as to realize the clock and alarm clock

function, and can be on the clock and alarm clock, minutes and

seconds to individually check, make the correction to standard

time. This design in order to control the hardware and software

and hardware combined with software as the guiding ideology,

give full play to the MCU function. At the same time, the digital

clock system also has the characteristics of low consumption,

low cost, strong practicability. Due to the function of the system is

simple, thus has certain extensibility.

Key words: AT89C51 single chip microcomputer; Digital tube

display;

目 录

要 ..........................................................................................................................................i

Abstract .....................................................................................................................................ii第一章 绪

论 .....................................................................................................................- 1 -

1.1 课题研究的背景....................................................................................................-

1 -

1.2课题研究的内容 ................................................................................................. -

2 -

第二章 KEIL集成开发环境的应用.................................................................................. -

3 -

2.1AT89C51单片机概述 ............................................................................................-

3 -

2.2 KEIL集成开发环境的应用与操作 .................................................................... -

3 -

2.2.1KEIL集成开发环境简介 ............................................................................. -

3 -

2.2.2 KEIL集成开发环境的基本仿真流程 ...................................................... -

4 -

第三章 数字钟系统的原理与设计 .................................................................................. -

6 -

3.1 数字钟系统的总体方案设计 ..............................................................................-

6 -

3.2 数字钟系统的硬件设计 ..................................................................................... -

6 -

3.2.1 复位电路的设计 ................................................................................ - 7 -

3.2.2 振荡电路的设计 ...................................................................................... -

8 -

3.2.3 按键选择电路的设计 ............................................................................ -

10 -

3.2.4 数码管显示电路的设计.......................................................................... -

11 -

3.2.4.1 数码管的显示原理..................................................................... -

13 -

3.2.4.2数码管的连接 ............................................................................. -

14 -

3.2.5蜂鸣器电路设计 ...................................................................................... -

14 -

3.3 数字钟系统的软件设计.....................................................................................-

16 -

3.3.1 初始化参数设置..................................................................................... -

17 –

3.3.2 时钟计时程序..................................................................................... - 17

-