当前位置:文档之家› 定时闹钟系统设计-毕业设计

定时闹钟系统设计-毕业设计

I

定时闹钟系统设计

学生:XXX 指导教师:XXX

内容摘要:时间是现代社会中不可缺少的一项参数,无论是平时生活还是社会生产都需要对时间进行控制,有的场合对其精确性还有很高的要求。本设计采用单片机芯片进行计时,由于AT89C51系列单片机的体积小,成本低,控制器运算能力强,处理速度快,可以精确计时,对于社会生产有着十分重要的作用。

在此次设计中,AT89C51单片机芯片是主要的元器件,通过它来控制电路的LCD、晶振、电阻、电容、发光二极管、开关、喇叭等元件组成的硬件电路,再利用软件来执行一定的程序来实现LCD电子定时闹钟计时功能和定时闹铃的设置和控制。由于系统所用元器件较少,单片机所被占用的I/O口不多,因此系统具有一定的可扩展性。

关键词: 单片机 计时 AT89C51

II

Timing alarm clock system design

Abstract: Time is the indispensable in the modern society, whether a

parameter

normally live or social production all need to control over time, some

occasions

to its accuracy and high requirements. This design USES the monolithic integrated

circuit chips for timing, due to the volume of the series microcontroller AT89C51

is small, low cost, operation ability, controller processing speed, can accurate

timing for social production, plays a very important role.

In this design, AT89C51 chip is the main components, by which it can control

circuit of LCD, crystals, resistor, capacitor, light-emitting diodes, switch,

loudspeaker elements such as hardware circuit, reuse of software to perform

certain procedures to achieve LCD electronic timing alarm clock function and

regular alarm Settings and control. Because the system which is less, SCM used

components is occupied I/O mouth not much, so system has certain expansibility.

Key word:SCM Timing AT89C51 III

目 录

前言 .................................................................................................................................................... 1

1 定时闹钟设计目的和功能 ........................................................................................................ 1

1.1 设计定时闹钟的目的和意义 ......................................................................................... 1

1.2 LCD电子闹钟的特点和功能介绍 ................................................................................ 1

1.2.1 数字钟介绍 ........................................................................................................... 2

1.2.2 电子钟设计特点 ................................................................................................... 2

1.2.3 电子钟的主要功能 ............................................................................................... 2

2 总体方案设计 ............................................................................................................................. 2

2.1 总体设计方案 .................................................................................................................. 2

2.2 AT89C51芯片介绍 ........................................................................................................ 3

2.2.1 单片机介绍 ........................................................................................................... 3

2.2.2 MCS–51单片机内部总体结构 ......................................................................... 4

2.2.3 MCS-51单片机的引脚 ...................................................................................... 5

3 硬件设计 ..................................................................................................................................... 8

3.1 主控芯片AT89C51的设计 .......................................................................................... 8

3.2 时钟电路部分设计 ........................................................................................................ 10

3.3 LCD显示电路部分 ....................................................................................................... 11

3.4 喇叭部分的电路 ............................................................................................................ 12

4 软件设计 ................................................................................................................................... 13

4.1 软件设计概述 ................................................................................................................ 13

4.2 主函数的设计 ................................................................................................................ 13 IV 4.3 部分设计思想的说明 ................................................................................................... 15

4.3.1 程序初始化 ......................................................................................................... 15

4.3.2 闹钟的实现 ......................................................................................................... 16

4.3.3 显示程序.............................................................................................................. 16

6 结束语 ....................................................................................................................................... 17

参考文献 .......................................................................................................................................... 19

相关主题