文档介绍:JIANGSU TEACHERS UNIVERSITY OF TECHNOLOGY
电子系统设计
课题: 基于单片机的多功能电子时钟系统
学院: 电气信息工程学院
专业: 电子信息工程
班级: 08电子1班
姓名:
学号:
指导老师: 刘晓杰
日期: 2012-1-4
目录
摘要 3
一、绪论 4
4
4
二、系统方案设计 4
4
主要模块的方案对比论证 5
单片机的选择 5
5
显示模块的选择 5
5
5
三、硬件电路设计 6
6
: 6
7
8
DS1302简介及引脚功能介绍 8
9
LCD1602显示模块的设计 9
9
10
10
本系统中4*4矩阵键盘接线图: 10
蜂鸣器电路模块的设计 11
11
四、系统的软件设计 12
软件设计的整体思路 12
15
DS1302 驱动程序 15
LCD1602驱动程序 17
键盘扫描程序 18
五、测试结果 20
、日期的显示: 20
时间、日期的校准 20
秒表的操作 20
六、总结 21
七、参考文献 21
八、附录 22
附录一、元器件清单 22
附录二、电路原理图 23
附录三、源程序清单 24
摘要
本设计要实现一个多功能电子时钟系统,包括硬件设计和软件设计,并重点讨论了模块软件设计和编程思想。
该系统以51单片机为核心,设计中采用STC89C52芯片、DS1302时钟芯片及LCD1602液晶显示器,附加必要地外围电路,整体由5V电源供电,再通过编写配套的C语言程序,实现年、月、日、时、分、秒、星期在LCD显示屏上显示。此外还实现了整点报时和秒表功能。
电子时钟主要利用电子技术将时钟电子化,数字化,具有时钟精确、体积小、可扩展性能强等特点,也可通过改装增加新功能,从而被广泛应用于生活和工作中。
关键词:电子时钟、单片机、C语言
Abstract
The design to achieve a multifunctional electronic clock system, including hardware design and software design, and discussed the module software design and programming.
The system with 51 single chip as the core, is adopted in the design of STC89C52 chip, the DS1302 chip and LCD1602 liquid crystal display, additional necessary peripheral circuits, which consists of 5V power supply, and then through the preparation of supporting C language program, to achieve annual, month, day, week, when minutes and seconds, displayed in the LCD display. In addition to realize the whole point timekeeping and stopwatch functions.
Electronic clock main use of electronic technology, electronic clock, digital clock, with precision, small volume, scalable performance and other characteristics, can also be modified to add new function, which is widely used in life and work.