毕业论文(基于单片机的时钟电路的设计).doc
文本预览下载声明
基于单片机的时钟电路的设计
The design of clock circuit based on MCU
专 业:电子信息科学与技术
学 号姓 名:乔波臻
指导教师:孙南海
基于单片机的时钟电路的设计
摘 要:
文章主要采用ATc51单片机最小化应用设计,LED显示采用动态扫描方式实现,P口输出段码数据,P.0-P1.2口作扫描输出,P—P0.4口接按钮开关。P0.0控制秒的调整,每按一次加1秒;P0.1控制分的调整,每按一次加1分;P0.2控制时的调整,每按一次加1个小时。为了提供LED数码管的驱动电流,用作电源驱动输出。实际设计按情况采用11.0592MHz的晶振。电子时钟电路采用h记时方式,时间用位数码管显示。该电路采用ATc51单片机,使用5V电池供电ased on MCU
Abstract:
This article mainly uses at98c51 monolithic integrated circuit minimum application design, LED demonstrated that selects the dynamic scanning method to realize, the P0 mouth output section code data, the P1.0-P1.2 mouth makes the scan out, the P0.1-P0.4 mouth meets push-button switch S1, S2, S3, S4, S5, rest. P0.0 control of the second adjustment, and each time one second; P0.1 control points of adjustment, each time at 1 pm; P0.2 control of the adjustment, and each time one hour.In order to provide the LED nixietube the drive current, 9012 makes the power source with the triode to actuate the output. The actual design uses 11.0592MHz according to the situation the crystal oscillator. The electron clock circuit selects the 24h time method, the time demonstrated with 8 nixietubes. This electric circuit uses at98c51 monolithic integrated circuit, uses the 5V battery power supply.
Key words: SCM; jitter;digital control; interrupt; low power consumption; the clock
目 录
1 引 言 1
2 以AT89C51单片机为核心的时钟电路结构和工作原理 2
2.1 AT89C51的结构组成及引脚功能 2
2.1.1 AT89C51的结构组成 2
2.1.2 AT89C51的引脚功能 3
2.2 时钟电路工作原理及原理图 6
2.4 时钟电路的消除震荡设计 9
2.5 时钟电路的误差分析及功耗 10
3 以AT89C51单片机为核心的时钟电路的程序设计 12
3.1主程序设计及系统主流程图 12
3.2 时钟电路的时钟和闹铃程序设计及流程图 13
3.3 时钟电路的显示程序设计及流程图 14
3.4 时钟电路的键盘程序设计及流程图 15
4 Keil 与Proteus软件的联调仿真 16
4.1 Keil? Software及Proteus 简介 16
4.2 时钟电路的仿真图如下 17
5 结束语 19
[参考文献] 20
附 录 21
致 谢 33
1 引 言
单片机模块中最常见的是数字钟,数字钟是一种用数字电路技术实现时、分、秒计时的装置,与机械式时钟相比具有更高的准确性和直观性,且无机械装置,具有更更长的使用寿命,因此得到了广泛的使用。 数字钟是采用数字电路实现对.时,分,秒.数字显示的计时装置,广泛用于个人家庭,车站, 码头办公室等公共场所,成为人们日常生活中不可少的必需品,由于数字集成电路的发展和石英晶体振荡器的广泛应用,使得数字钟的精度,远远超过老式钟表, 钟表的数字化给人们生产生活带来了极大
显示全部