文件名称:单片机的数字时钟设计
文件大小:45KB
文件格式:DOC
更新时间:2012-06-01 10:22:02
数字时钟 液晶显示 单片机 精度
With the continuous development of science and technology, People have higher request to the accuracy of the time calculate. How the clock work more precisely? How to allow them a better service to our lives? Clearly the traditional clock can not meet people's needs. This requires people to continue to design a new clock. Nowadays, most of the high-precision timing tools use the quartz crystal oscillator. The electronic clock has been made of quartz technology. Its advantage is high accuracy, stability, ease of use, no regular adjustment. Digital clock uses integrated circuits to replace mechanical components and LCD to replace indicators to show time. So it reduces the time error. This kind of clock has the function of showing hours, minutes clearly and adjusting hours and minutes easily. The design use MCU to achieve timing function, which is the core component ,at the same time use LCD Dynamically displaying "hours", "minutes" and "seconds" .Compared with the traditional mechanical watches, it has a precise timing , intuitive, and other characteristics. Its timing period is 24-hour. Its full scale is "23:59:59", and error ≤4 s / day. This system mainly carries on the research of the digital clock and its system based on SST89E564RD.The system takes liquid crystal display, matching with keys to provide friendly customer interface .The digital clock can be continuous and stable working and easy to use. Program main achieve function of keypad, LCD and timing, using C-language. KEY WORDS :Digital Clock, Liquid Crystal Display, MCU, Adjust,Accuracy 摘要.................................................. I ABSTRACT.............................................. II 目 录................................................ III 前 言................................................. 1 第一章 数字时钟设计简介................................. 3 §1.1 数字时钟的拟实现功能...................................................................................... 3 §1.2 时钟方案选择...................................................................................................... 3 §1.3本设计实现方法................................................................................................... 3 第二章 系统主要硬件电路设计............................. 4 §2.1系统原理............................................................................................................... 4 §2.2模块电路设计与比较........................................................................................... 4 §2.3各功能模块硬件设计及实现............................................................................... 5 §2.3.1 单片机模块.................................................................................................. 5 §2.3.2 键盘模块.................................................................................................... 7 §2.3.3液晶显示模块............................................................................................. 8 §2.3.4备用电池问题............................................................................................. 9 §2.3.5直流稳压电源部分................................................................................... 10 §2.4电路制作............................................................................................................ 10 §2.4.1元器件布置............................................................................................... 11 §2.4.2元器件配置布局应考虑的因素............................................................... 12 §2.4.3元器件焊接注意事项............................................................................... 12 第三章 软件系统设计.................................... 13 §3.1 系统主程序设计................................................................................................ 13 §3.2 时间日期调整子程序设计............................................................................... 14 §3.3 定时中断子程序设计........................................................................................ 15 §3.4 键盘中断处理子程序设计................................................................................ 16 第四章 设计分析与系统调试.............................. 18 §4.1 时钟计时计算.................................................................................................... 18 §4.2 时钟校准............................................................................................................ 18 §4.3 系统调试............................................................................................................ 20 §4.3.1 硬件调试.................................................................................................... 20 §4.3.2 软件调试................................................................................................. 20 结论.................................................. 21 参考文献.............................................. 22 致谢…………………………………………….………………………24 附 录................................................. 25 附录Ⅰ 最小系统板PCB图....................................................................................... 25 附录Ⅱ 最小系统板原理图....................................................................................... 25 附录Ⅲ 键盘PCB图................................................................................................. 26 附录Ⅳ 键盘原理图................................................................................................... 27 附录Ⅴ 程序清单....................................................................................................... 27