好文档 - 专业文书写作范文服务资料分享网站

51单片机电子万年历设计带有proteus仿真

天下 分享 时间: 加入收藏 我要投稿 点赞

湖南文理学院课程设计

课程名称: 单片机课程设计 设计题目: 电子万年历 教学院部: 电气与信息工程学院 专业班级: 自动化09101班 指导教师: 张 晓 虎 学生姓名: 邵 泽 学 号: 200916010120 完成时间: 2012 年6月12日 报告成绩:

评阅意见: 日期

评阅教师 1

摘要:

电子万年历是一种非常广泛日常计时工具,对现代社会越来越流行。它可以对年、月、日、周日、时、分和秒进行计时,还具有闰年补偿等多种功能,而且DS1302的使用寿命长,误差小。对于数字电子万年历采用直观的数字显示,可以同时显示年、月、日、周日、时、分、秒等信息,还具有时间校准等功能。该电路采用AT89C52单片机作为核心,功耗小,能在3V的低压工作,电压可选用3到5V电压供电。

万年历的设计过程在硬件与软件方面进行同步设计。硬件部分主要由AT89C52单片机,液晶显示电路,复位电路,时钟电路,稳压电路电路以及串口下载电路等组成。在单片机的选择上使用了AT89C52单片机,该单片机适合于许多较为复杂控制应用场合。显示器使用液晶LCD1602。软件方面主要包括日历程序、液晶驱动程序,显示程序等。程序采用汇编语言编写。所有程序编写完成后,在Keil C51软件中进行调试,确定没有问题后,在Proteus软件中嵌入单片机内进行仿真。

关键词 时钟电钟,DS1302,液晶LCD1602,单片机

Abstract:

Electronic calendar is a very extensive daily timing tool for modern society is more and more popular. It can be to year, month, day, Sunday, when, minutes, and seconds for the time, also has a leap year compensation and other functions, and the DS1302 long service life and small error. For digital electronic calendar using intuitive digital display, can also shows that year, month, day, Sunday, when the information such as, minutes and seconds, still have time calibration etc. Function. The AT89C52 single chip microcomputer as circuit adopts core, power consumption is small, can be in 3 V of low-pressure work, voltage can choose 3 to 5 V voltage power supply.

The design process of the calendar in the hardware and software design of synchronization. Mainly by AT89C52 single chip microcomputer hardware part, liquid crystal display circuit, reset circuit, clocking circuit on the circuit circuit and serial download circuit etc. The processor on the choice of the single chip microcomputer AT89C52 use, the single chip microcomputer suitable for many more complex control applications. Use of liquid crystal display LCD1602. Software is mainly including calendar program, liquid crystal driver, show program, etc. Program using assembly language. All programming, after the completion of Keil C51 software in commissioning, make sure no, after Proteus software embedded in within the single chip microcomputer simulation. Key words DianZhong clock, DS1302, liquid crystal LCD1602, microcontroller

2

目 录

1设计要求与方案论证 ............................................................................................................................................ 4 1.1 设计要求 ......................................................................................................................................................... 4 1.2 系统基本方案选择和论证 ............................................................................................................................... 4 1.2.1单片机芯片的选择方案和论证 ................................................................................................................ 4 1.2.3时钟芯片的选择方案和论证: ................................................................................................................ 5 1.3 电路设计最终方案决定 ................................................................................................................................... 5 2系统的硬件设计与实现 ........................................................................................................................................ 5 2.1 电路设计框图 ................................................................................................................................................... 5 2.2 系统硬件概述 ................................................................................................................................................... 6 2.3 主要单元电路的设计 ....................................................................................................................................... 6 2.3.1单片机主控制模块的设计 ........................................................................................................................ 6 2.3.2时钟电路模块的设计 ................................................................................................................................ 7 2.3.3显示模块电路 ............................................................................................................................................ 8 2.3.4串口下载电路 ............................................................................................................................................ 9 2.3.5复位电路 .................................................................................................................................................... 9 2.3.6稳压电路 ...................................................................................................................................................10 3系统的软件设计 ...................................................................................................................................................10 3.1程序流程框图 ................................................................................................................................................... 11 3.2子程序的设计 ................................................................................................................... 错误!未定义书签。 3.2.1读写DS1302子程序 ................................................................................................. 错误!未定义书签。 3.2.1读写LCD1602子程序 ............................................................................................... 错误!未定义书签。 4软件测试及分析 ................................................................................................................................................... 11 4.2分析与结论 .......................................................................................................................................................12 4.2.1 调试分析 ..................................................................................................................................................12 4.2.2调试和结论 ...............................................................................................................................................13 5总结 .......................................................................................................................................................................13

3

51单片机电子万年历设计带有proteus仿真

湖南文理学院课程设计课程名称:单片机课程设计设计题目:电子万年历教学院部:电气与信息工程学院专业班级:自动化09101班指导教师:张晓虎学生姓名:
推荐度:
点击下载文档文档为doc格式
70rv809ccj0h1ll029yi
领取福利

微信扫码领取福利

微信扫码分享