1、 1 摘 要 本设计以数字集成电路技术为基础, 单片机技术为核心。 软件设计采用模块化结构, 汇编语言编程。系统通过 LCD 显示数据,可以显示公历日期(年、月、日、时、分、秒) 以及星期。在内容安排上首先描述系统硬件工作原理,着重介绍了各硬件接口技术和各 个接口模块的功能;其次,详细的阐述了程序的各个模块和实现过程。 关键词:单片机,万年历,DS1302,LCM1602 ZHANG Pan Henan Normal University College of Physial Education Xinxiang Henan 453000 Abstract: The design is bas
2、ed on digital integrate circuit, microcontroller technology is the core of the system. The software design uses module structure and adapts microcontroller assemble language. The system can display calendar date, including year, month, week, hour, minute, second and week. The work principle of the s
3、ystem is discussed in this paper, hardware interface and module function are reported primarily in the system. Every module of program is described explicitly. Keywords: MCU , Calendar, DS1302, LCM1602 2 目目 录录 摘要摘要 错 误!未定义书签。 1.设计要求 2 方案论证与设计 2.1 用可编程逻辑器件设计 2.1.1 控制器部分 2.2 显示部分的方案选择 2.3 系统设计 2.3.1 晶
4、体振荡器电路 2.3.2 分频器电路 2.3.3 时间计数器电路 2.3.4 时钟电路 2.3.5 复位电路 2.3.6 复位电路的可靠性设计 2.3.7 按键部分 2.3.8 蜂鸣器电路 2.3.9 根据各模块的功能互相连接成电子万年历的控制电路 3 各硬件介绍 3.1AT89S51 的引脚说明 3.2 发光二极管指示电路设计 3.3 蜂鸣器电路设计 3.3.1 蜂鸣器的介绍 3.3.2 蜂鸣器的结构原理 3.4 LCM1602 简介 3.5 DS1302 简介 4 系统硬件设计所需的器材 5 系统软件总体设计 6 系统功能介绍 6.1 按键介绍 6.2 星期计算 7 主程序流程图 3 8 安装制作 9 调试与检测安全 10结束语 1 1 设计要求设计要求 本设计准备实现的功能: (1) 显示公历日期功能(年、月、日、时、分、秒以及星期) (2) 可通过按键切换年、月、日及时、分、秒的显示状态 (3) 可随时调校年、月、日或时、分、秒 (4) 可每次增减一进行时间调节 (5) 可动态完整显示年份,实现真正的万年历显示 2 2 方案论证与设计方案论证与设计