辅导交流
地 址:西安市科技路JR电子科技
3127247860:点击这里给我发消息
2733195595:点击这里给我发消息
电 话:13649286003
邮 箱:jr_dz_kj@163.com
当前位置:首页主页 >> 论文展示 >>
基于单片机数字钟的设计与实现
作者:admin   发布于:2014-03-05 20:34    文字:【】【】【
 
基于单片机数字钟的设计与实现
摘  要
随着社会、科技的发展,人类得知时间,从观太阳、摆钟到现在电子钟,不断研究、创新。为了在观测时间,能够了解与人类密切相关的信息,比如星期、日期等,电子时钟诞生了,它集时间、日期、星期等功能于一身,具有读取方便、显示直观、功能多样、电路简洁等诸多优点,符合电子仪器仪表的发展趋势,具有广阔的市场前景。
  该电子时钟主要采用STC89C52RC单片机作为主控核心,由DS1302时钟芯片提供时钟、LCD液晶屏显示。STC89C52RC单片机是由Atmel公司推出的,功耗小,电压可选用4~6V电压供电;DS1302时钟芯片是美国DALLAS公司推出的具有涓细电流充电功能的低功耗实时时钟芯片,它可以对年、月、日、星期、时、分、秒进行计时,而且DS1302的使用寿命长,误差小;数字显示是采用的LCD显示屏来显示,可以同时显示年、月、日、星期、时、分、秒等信息。此外,该数字时钟还具有时间校准等功能及整点报时功能。
  
 
关键词: 时钟电路    时钟芯片DS1302    LCD    单片机STC89C52RC
 
ABSTRACT
    With the development of social, technological, human beings learned, from the view of the sun, the pendulum clock to the present electronic clock, continuous research, innovation. In order to be able to understand the observation time, closely related to the human information, such as the day, date, etc., the birth of the electronic clock, set the time, date, day of the week and other functions in one, easy to read, intuitive display, versatile, simple circuit and many other advantages, in line with the trend of development of electronic instrumentation, and has broad market prospects.
The electronic clock with STC89C52RC microcontroller as the master core clock provided by the DS1302 clock chip, LCD liquid crystal display. The microcontroller STC89C52RC is introduced by Atmel, power consumption, voltage can be used to 6V voltage power supply; DS1302 clock chip Dallas launched a trickle charge current, low-power real-time clock chip, it can be years, month, day, week, hour, minutes, seconds, chronograph, leap year compensation also has a variety of functions, and the DS1302 long life, small error; digital display using LCD display to display, can display year, month , day, week, hours, minutes, seconds information. In addition, the electronic clock also has a time calibration function and the whole point timekeeping function.
 
Keywords: clock circuit   clock chip   DS1302   LCD   microcontroller   STC89C52RC

目录
第一章  绪  论........................................................... 1
第二章  设计要求与方案论证.............................................. 5
2.1引言.............................................................. 5
2.2功能要求.......................................................... 5
2.3方案论证.......................................................... 5
2.3.1技术可行性.................................................. 5
2.3.2单片机的选择................................................ 6
2.3.3时间处理模块................................................ 6
2.3.4显示模块的选择.............................................. 7
2.3.5键盘模块的选择.............................................. 7
2.3.6总体方案论证与选择.......................................... 7
第三章  系统硬件电路设计................................................ 9
3.1电路设计.......................................................... 9
3.2系统硬件概述...................................................... 9
3.2.1主控制器STC89C52RC.......................................... 9
3.2.2时钟芯片DS1302............................................. 13
3.2.3串口芯片MAX232............................................. 17
3.3主要单元电路的设计............................................... 17
3.3.1显示电路................................................... 17
3.3.2键盘接口................................................... 19
3.3.3按键开关去抖动问题......................................... 20
3.3.4查询式按键及其接口......................................... 21
3.3.5整点报时功能............................................... 21
第四章  系统的软件设计................................................. 23
4.1软件设计......................................................... 23
4.2程序说明......................................................... 24
4.2.1时钟电路DS1302............................................. 24
4.2.2键盘扫描................................................... 27

4.2.3显示子程序display.......................................... 30
4.2.4整点报时................................................... 32
第五章  结束语.......................................................... 33
致  谢.................................................................. 35
参考文献................................................................ 37


附件一 附件二 附件三 附件四
友情链接