600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > 单片机at89c51数字钟c语言 课程设计基于单片机AT89C51数字钟自动计时器.doc

单片机at89c51数字钟c语言 课程设计基于单片机AT89C51数字钟自动计时器.doc

时间:2023-02-23 22:35:26

相关推荐

单片机at89c51数字钟c语言 课程设计基于单片机AT89C51数字钟自动计时器.doc

学院单片机课程设计

基于51单片机的数字时钟的设计

学生姓名:

学生学号:

院(系):

年级专业:

指导教师:

二〇一一年六月

摘 要

本文设计的是一个基于单片机AT89C51的数字钟自动计时器,附有复位电路,显示电路,按键电路等。复位电路是单片机的初始化操作,除了正常的初始化外,为摆脱困境,通过复位电路可以重新开始。时钟电路采用12MHz的晶振,作为系统的时钟源,具有较高的准确性。

在上电时LED显示器开始显示时间并自动计时,在按键电路中只设置了三个按键,通过检测第一个按键按下的次数来实现调时、调分、调秒按键的作用,再通过LED显示器显示时、分、秒的改变。并且在P1端口处接了一个指示灯,指示按键的按下。在这里主要是以AT89C51单片机为核心控制器,P0口接LED显示模块,P1口接按键的,通过按键输入来控制显示器的显示。

关键字 AT89C51,LED显示器,数字时钟

ABSTRACT

This design is based on AT89C51 single-chip digital clock auto-timer, with a reset circuit, display circuit, the key circuit. Reset circuit is a microcontroller initialization, in addition to the normal initialization, for the bail out through the reset circuit can begin again. 12MHz crystal clock circuit, as the system clock source, with high accuracy.

LED display on power began to show time and automatic timing, set in the key circuit only three buttons, a button pressed by detecting the number of the first to achieve the transfer, the transfer points, transfer second key role, through the LED display hours, minutes, seconds to change. And then at the P1 port of a light to indicate the button press. Here is AT89C51 microcontroller as the core of the main controller, P0 port access the LED display module, P1 port access keys, keystrokes to control the monitor display.

Keywords AT89C51, LED display, digital clock

目 录

摘要Ⅰ

ABSTRACTⅡ

1 绪论2

1.1课程设计要求2

1.2课程设计的基本原理2

2 硬件设计3

2.1振荡电路的设计3

2.2复位电路的设计3

2.3 键盘接口电路设计4

2.4 显示电路的设计4

2.5整体电路的设计5

3软件设计6

3.1 单片机资源使用6

3.2 定时计数器中断子函数6

3.3判键子函数7

3.4按键调试流程8

4仿真与测试9

4.1自动计时9

4.2按钮调时9

心得体会10

参考文献11

附录12

1 绪 论

1.1课程设计要求

1. 应用MCS-51单片机设计单片机实现数字钟(LED显示:小时、分、秒)仿真电路;

2. 选用8位LED数码显示,实时显示时、分、秒,采用组合按键实现时钟对表功能,能调时、调分、调秒;

3. 要求显示范围最大到23小时59分59秒,用定时中断来实现。

4.用键选位。

1.2课程设计基本原理

通过对以上功能要求可知其基本原理,以AT89C51单片机为核心控制器,P0口接LED显示模块,P1口接按键,通过按键输入来控制显示器的显示。在上电时LED显示器开始显示时间并自动计时,自动计时采用单片机内部T0中断实现,在按键电路中只设置了三个按键,通过检测第一个按键按下的次数来实现调时、调分、调秒按键的

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。