1、 单片机技术课程设计说明书单片机技术课程设计说明书 数 字 电 子 钟 I 摘 要 电子钟在生活中应用非常广泛,而一种简单方便的数字电子钟则更能受到人们 的欢迎。 所以设计一个简易数字电子钟很有必要。 本电子钟采用ATMEL公司的AT89S52 单片机为核心,使用 12MHz 晶振与单片机 AT89S52 相连接,通过软件编程的方法实 现以 24 小时为一个周期, 同时 8 位 7段 LED 数码管(两个四位一体数码管)显示小时、 分钟和秒的要求。该电子钟设有四个按键 S1、S2、S3 和 S4 键,进行相应的操作就可 实现校时、复位功能。具有时间显示、校正等功能。走时准确、显示直观、运行稳
2、定等优点。具有极高的推广应用价值。 关键词 电子钟;AT89S52;硬件设计;软件设计 ABSTRACT Clock is widely used in life, and a simple digital clock is more welcomed by people. So to design a simple digital electronic clock is necessary.The system use a single chip AT89S52 of ATMELs as its core to control The crystal oscillator clock,usi
3、ng of E-12MHZ is connected with the microcontroller AT89S52, through the software programming method to achieve a 24-hour cycle, and eight 7-segment LED digital tube (two four in one digital tube) displays hours, minutes and seconds requirements, and in the time course of a timing function, when the
4、 time arrived ahead of scheduled time to buzz a good timekeeping. The clock has four buttons S1, S2, S3 and S4 key, and make the appropriate action can be achieved when the school, timing, reset. With a time display, alarm clock settings, timer function, corrective action. Accurate travel time, disp
5、lay and intuitive, precision, stability, and so on. With a high application value. Key words Electronic clock;;AT89S52;Hardware Design;Software Design II 目目 录录 1 设计课题任务、功能要求说明及方案介绍1 1.1 设计课题任务1 1.2 功能要求说明1 1.3 设计总体方案介绍及原理说明1 2 设计课题硬件系统的设计2 2.1 设计课题硬件系统各模块功能简要介绍2 2.2 设计课题电路原理图、PCB 图、仿真电路图2 2.3 设计课题元器件清单3 3 设计课题软件系统的设计5 3.1 设计课题使用单片机资源的情况5 3.2 设计课题软件系统各模块功能简要介绍5 3.3 设计课题软件系统程序流程框图5 3.4 设计课题软件系统程序清单10 4 设计结论、仿真结果、误差分析、教学建议25 4.1 设计课题的设计结论及使用说明25 4.2 设计课题的仿真结果25 4.3 设计课题的误差分析26 4.4 设计体会