1、 学士学位学士学位毕业毕业论文论文( (设计设计) ) 题 目:基于单片机的 12864 时钟显示 摘要 电子时钟是一种非常广泛日常计时工具,给人们的带来了很大的方便,在社 会上越来越流行。它可以对年、月、日、星期、时、分、秒进行计时,采用直观 的数字显示,可以同时显示年月日时分秒等信息,还有时间校准等功能。该电子 时钟主要采用 STC89C52 单片机作为主控核心,用 DS1302 时钟芯片作为时钟、液 晶 12864 显示屏显示。 STC89C52 单片机是由深圳宏晶科技公司推出的, 功耗小, 电压可选用 46V 电压供电;DS1302 时钟芯片是美国 DALLAS 公司推出的具有细 电流
2、充电功能的低功耗实时时钟芯片,它可以对年、月、日、星期、时、分、秒 进行计时,还具有闰年补偿等多种功能,而且 DS1302 的使用寿命长,误差小; 数字显示是采用的 12864 液晶显示屏来显示,可以同时显示年、月、日、星期、 时、分、秒等信息。此外,该电子时钟还具有时间校准等功能。 关键词:STC89C51 单片机,DS1302 时钟芯片,液晶 12864 Abstract Electronic clock is a very extensive daily timing tool, to the people has brought great convenience, more and
3、more popular in the community. It can be the year, month, date, day, hour, minute, second for a time, using intuitive digital display, can display information such as year, month, day, hour, and time alignment functions. The electronic clock is used mainly as a master STC89C52 microcontroller core,
4、with theDS1302 clock chip as a clock, LCD display12864. STC89C52 SCM is a Shenzhen Hong Crystal Technology has introduced, power consumption, voltage can be selected 4 6V voltage power supply; DS1302 clock chip is American DALLAS company launched with a fine current charging low-power real-time cloc
5、k chip, it can year, month, date, day, hour, minute, second for a time, also has a leap year compensation and other functions, DS1302 and long life, small error; 12864 LCD digital display is used to display that can display year, month, date, day, hour, minute, second and so on. In addition, the ele
6、ctronic clock also has a time calibration function. Key Words: STC89C51 microcontroller, DS1302 clock chip, LCD 12864 目录目录 1 1 绪论绪论 3 1.1 时钟发展史 3 1.2 目前的研究现状 4 1.3 研究目的及意义 4 2 2 总体方案设计总体方案设计 . 5 2.1 方案的选择 5 21.1 设计要求 . 5 21.2 方案的选择 . 5 2.2 总体方案组成框图 6 3 3 系统硬件设计系统硬件设计 6 3. 1 主芯片模块 . 6 3.1.1 中断系统 8 3.1.2 常用寄存器 8 3.2 晶振和复位电路 . 10 3.2.1 晶振电路 . 10 3.2.2 复位电路 . 11 3.3 DS1302 时钟芯片电路 . 11 3.3.1 DS1302 引脚图 . 11 3.3.2 DS1302 寄存器 . 12 3.3.3 DS1302 外围电路 . 13 3.4 LCD12864 显示模块 13 3.4.1 LCD12864 引脚功能 13