当前位置:文档之家› 基于单片机的多功能液晶显示数字时钟设计

基于单片机的多功能液晶显示数字时钟设计

基于单片机的多功能液晶显示数字时钟设计摘要计算机的产生加快了人类改造世界的步伐,但是它毕竟体积大。

单片机在这种情况下诞生了。

截止今日,单片机应用技术飞速发展,纵观我们现在生活的各个领域,从导弹的导航装置,到飞机上各种仪表的控制,从计算机的网络通讯与数据传输,到工业自动化过程的实时控制和数据处理,以及我们生活中广泛使用的各种智能IC卡、电子宠物等,这些都离不开单片机。

单片计算机即单片微型计算机。

是集CPU,RAM,ROM,定时,计数和多种接口于一体的微控制器。

它体积小,成本低,功能强,广泛应用于智能产业和工业自动化上。

而51系列单片机是各单片机中最为典型和最有代表性的一种。

这次毕业设计通过对它的学习,应用,从而达到学习、设计、开发软、硬的能力。

本文通过对一个基于单片机的能实现定时,秒表,闹钟等功能的多功能电子时钟的设计学习,详细介绍了单片机应用中的数据转换显示,液晶显示原理,键盘扫描原理。

从而达到学习、了解单片机相关指令在各方面的应用。

系统由AT89C51、温度检测芯片、时钟芯片、液晶显示器等部分构成,能实现时钟日历显示的功能,能进行时、分、秒的显示和实时温度显示。

也具有时钟、日历的校准,定时时间的设定和闹铃等功能。

文章后附有电路原理图、PCB板图和程序清单,以供读者参考。

因水平有限,难免有疏落不足之处,敬请老师和同学能给与批评指正。

关键字:AT89C51 定时秒表闹钟Designs of LCD digital clock based onMCS-51AbstractComputers have accelerated the transformation of the world's human pace, but it is after all bulky. SCM in this case was born. As of today, SCM application rapid development of technology, looking around us now in all spheres of life, from missiles, navigation equipment, to the various instruments on the aircraft control from a computer network communications and data transmission, industrial automation to real-time process control and data processing, and our lives extensive use of the smart card, electronic pets, which is inseparable from the microcontroller.Monolithic single-chip micro-computer or computer. That is the set of CPU, RAM, ROM, the timing, number and variety of interface integrated microcontrollers. Its small size, low cost, high performance, which are widely used in smart industries, and industrial automation. And 51 Series SCM SCM is the most typical and the most representative one. The graduation design Through the study, and thereby achieve the study, design, development hardware and software capabilities.Based on a microcontroller based on the will to achieve timing, stopwatch, alarm clocks, and other functions of a multi-functional electronic clock design study, in detail, the computer application of data conversion, Principle LCD, keyboard scanning principle. Thereby achieve studying and understanding the relevant directives SCM in all aspects of the application. By AT89C51 system, temperature detection chip, the clock chips, liquid crystal displays of components, to achieve clock calendar display function can be carried out, hours seconds of the show and real-time temperature display. Also calculated with the calendar and clock, calendar calibration, regular hours and set the alarm function. The article attached circuit diagram, the PCB plans and procedures checklist for the reference of our readers. Due to limited, and it will inevitably be lighter inadequate, locations will give teachers and students correction and criticism.Key words: AT89C51; timing; stopwatch; alarm clocks目录1引言 (1)2总体方案介绍 (2)2.1系统设计思想 (2)2.2系统框架图 (2)3硬件仿真电路设计 (3)3.1 Proteus (3)3.1.1 Proteus简介 (3)3.1.2 Proteus的基本操作 (3)3.2 AT89C51的电路设计 (5)3.2.1 AT89C51简介 (5)3.2.2 AT89C51的时钟电路设计 (7)3.2.3 AT89C51的复位电路设计 (8)3.3 AT89C51液晶显示模块的连接 (9)3.3.1液晶显示器LCD1602简介 (9)3.3.2 AT89C51与LCD1602的连接 (14)3.4 AT89C51与时钟芯片的连接 (14)3.4.1时钟芯片DS1302简介 (14)3.4.2 AT89C51与时钟芯片DS1302的连接 (16)3.5 AT89C51与温度芯片的连接 (17)3.5.1温度芯片DS18B20简介 (17)3.5.2AT89C51与温度芯片DS18B20的连接 (17)3.6 AT89C51与键盘的连接 (18)4 系统软件设计 (20)4.1Keil简介 (20)4.2程序设计 (20)4.2.1主程序模块设计 (20)4.2.2液晶显示器LCD1602模块 (22)4.2.3时钟芯片DS1302操作模块 (23)4.2.4温度芯片DS18B20操作模块 (25)4.2.5键盘操作模块 (26)5 Proteus与Keil连接调试 (27)6硬件实现 (31)6.1 Protel简介 (31)6.2 Protel的硬件电路设计 (31)6.2.1 创建项目文件 (31)6.2.2 原理图设计 (32)6.2.3 报表生成 (33)6.2.4 创建PCB文件 (33)6.2.5 PCB布线 (35)6.2.6 3D效果图 (36)7结论 (36)谢辞 (38)参考文献 (39)附录 (40)外文资料 (77)1引言单片机是指一个集成在一块芯片上的完整计算机系统。

尽管他的大部分功能集成在一块小芯片上,但是它具有一个完整计算机所需要的大部分部件:CPU、内存、内部和外部总线系统,目前大部分还会具有外存。

同时集成诸如通讯接口、定时器,实时时钟等外围设备。

而现在最强大的单片机系统甚至可以将声音、图像、网络、复杂的输入输出系统集成在一块芯片上。

目前单片机已经渗透到我们生活的各个领域,几乎很难找到哪个领域没有单片机的踪迹。

导弹的导航装置,飞机上各种仪表的控制,计算机的网络通讯与数据传输,工业自动化过程的实时控制和数据处理,广泛使用的各种智能IC卡,民用豪华轿车的安全保障系统,录像机、摄像机、全自动洗衣机的控制,以及程控玩具、电子宠物等等,这些都离不开单片机。

更不用说自动控制领域的机器人、智能仪表、医疗器械了。

因此,单片机的学习、开发与应用将造就一批计算机应用与智能化控制的科学家、工程师。

本次设计的多功能数字时钟,以AT89C51芯片为核心,辅以必要的电路,通过液晶显示器能够准确显示数字时钟。

它也是现代社会应用广泛的计时工具,在航天、电子等科研单位,工厂、医院、学校等企事业单位,各种体育赛事及至我们每个人的日常生活中都发挥着重要的作用。

该系统同时具有硬件设计简单、工作稳定性高、价格低廉等优点。

2总体方案介绍整个电子时钟系统电路可分为五大部分:中央处理单元(CPU)、电源电路部分、显示部分、键盘输入部分、温度采集部分。

2.1系统设计思想本系统由控制时钟芯片DS1302、温度芯片DS18B20、AT89C51单片机和字符点阵型LCD1602液晶显示器等器件构成。

用DS1302产生时钟信号,用温度芯片DS18B20产生温度信号,再由单片机负责接收并且对其进行控制,然后通过编写程序实现具体的功能,如年、月、日、星期、时、分、秒及温度的显示,以及时间的校准、闹钟的设置等。

再通过编写液晶器件的驱动程序,使其信息显示在LCD1602液晶显示器上。

最后,将设计的硬件电路在Proteus 仿真软件中进行仿真。

2.2系统框架图根据上述的系统设计总思想设计出如下总体框架图(图2-1):图2-1系统总体框架图3硬件仿真电路设计在前面的章节给出了系统设计的粗略轮廓,在本章节中,将画出详细的电路仿真原理图,并按照要求仔细地在Proteus中完成硬件的仿真电路。

相关主题