1、 摘 要 随着生活节奏的加快,人们时间观念的加强,时钟已经成为人们日常生活中 不可或缺的一部分,而如何在时钟的基础上,根据人们生活的需要增加相应的功 能以方便人们的生活,成为时钟设计方面的重点。 本设计基于单片机技术原理,以单片机芯片 STC89C52 作为核心控制器,通 过硬件电路的制作以及软件程序的编制,设计了基于数字时钟的可定时报警并向 手机发送短信的巡检定时器。其中时钟系统主要由时钟模块、液晶显示模块、键 盘控制模块以及报警模块组成。系统具有简单清晰的操作界面,能在+5V 直流电 源下正常工作。能够准确显示日期和时间(显示格式为年、月、日、时、分、秒; 24 小时制) ,可随时进行时间
2、调整。具有闹钟时间设置、闹钟开/关、止闹功能。 而定时向手机发送短信的部分则是基于单片机的 GSM 短信收发系统。 关键词:单片机;数字时钟;巡检;定时 Abstract With the accelerated pace of life,with peoples concept of time to strengthen,the clock has become an integral part of daily life,and how to increase,according to the needs of peoples lives on the basis of the clock
3、,the corresponding functions to facilitate peoples lives becomes what the clock design focuses on. Based on principles of single-chip computer,using chip STC89C52 as the core controller,the paper shows a design of a polling timer based on the design of the digital clock timing alarm.The design can r
4、ealize the function of sending SMS to mobile phone. The clock system is mainly composed of a clock module, LCD display module, keyboard control module and a warning module. The system has a simple and clear user interface, and it can be in the +5V DC power supply to work. Also it can be able to accu
5、rately display the date and time (display format for year, month, day, time, minutes, seconds. 24 hours system ).It may at any time to adjust time, and has funtions of setting the alarm time, turning the alarm on / off, stopping alarm. While the part of timing sending SMS to mobile phone is based on
6、 the MCU GSM SMS transceiver system. Key words: Single chip microcomputer;digital clock; On-site inspection;Timing I 目 录 第第 1 1 章章 绪论绪论 1 1 1.1 课题研究背景及意义 1 1.2 数字时钟的发展现状 1 1.3 论文主要内容及结构安排 3 第第 2 2 章章 总体方案论证与设计总体方案论证与设计 4 4 2.1 设计要求 4 2.2 总体设计方案 5 2.3 各功能模块方案选择 5 2.4 本章小结 7 第第 3 3 章章 系统硬件设计系统硬件设计 8 8 3.1 单片机最小系统电路设计 8 3.2 LCD 显示系统硬件设计 11 3.3 时钟系统电路设计 . 12 3.4 键盘控制系统电路设计 . 14 3.5 报警系统电路设计 . 15 3.6 手机传送短信系统电路设计 . 15 3.7 串行通信接口系统电路设计 . 18 3.8 本章小结 . 20 第第 4 4 章章 系统软件设计系统软件设计 2121 4.1 主程序的设计 .