1、 i 本 科 生 毕 业 论 文本 科 生 毕 业 论 文 ( (设 计设 计 ) ) 题题 目:目: 学校上课自动打铃系统学校上课自动打铃系统 ii 目目 录录 摘 要(关键词) 4 ABSTRACT(KEY WORDS) . 4 前 言 5 1 系统设计 6 1.1 设计任务 6 1.2 设计要求 6 2 方案设计 7 2.1 控制部分 7 2.2 时钟部分 7 2.3 显示部分 7 3 系统硬件电路设计 7 3.1 设计思路 7 3.2 各模块电路设计 8 3.2.1 键盘电路 8 3.2.2 电源和继电器控制电路图及说明 9 3.2.3 DS1337 时钟芯片电路图及说明 . 11 3
2、.3 总电路图 . 12 3.3.1 存储器设置 . 12 3.3.2 时钟电路 14 4 软件设计 . 14 4.1 I2C 总路线的编程 14 4.1.1 I2C 总线工作原理 14 4.1.2 I2C 总线的数据传输 15 4.1.3 读写操作 16 4.2 程序结构图 . 17 iii 4.2.1 中断流程图 17 4.2.2 主程序流程图 . 18 4.3 汇编程序 . 19 5 结束语 . 29 参考文献 . 30 致 谢 错误错误! !未定义书签。未定义书签。 4 学校上课自动打铃系统学校上课自动打铃系统 摘摘 要要 校园作息时间控制系统主要用于学校,对一些以 24 小时为周期的
3、开关量进行 自动控制。如上下课打铃等。 本系统就是以上下课自动打铃为依据来设计的,分为四大方面:系统设计、方 案设计、系统硬件电路设计和软件设计。主要以 SPCE061A 单片机作为控制核心, 用 DS1337C 时钟芯片来计算当前时间。 并通过 LCD 来显示当前时间和日期, 以及设 置打铃的数据。设置的数据用 FLASH 来存储,以达到掉电后数据不丢失的目的。本 打铃器最多可以设置 30 路打铃时间,每天循环可设定双休日或单休日不打铃。掉 电后时间能保持当前时间和所设置好的数据, 不用每次掉电后都要设置当前时间和 设置的数据。 关键字关键字 SPCE061A 单片机;DS1337C 时钟芯
4、片;自动打铃;自动控制电路 Abstract Campus schedule control system is mainly used in schools to 24 hours for some of the switch cycle automation. As school bell, such as fighting. More than the school system is based on auto-play Ling designed and divided into four major areas: system design, program design, sys
5、tem hardware circuit design and software design. Mainly single-chip microcomputer as the control SPCE061A core DS1337C clock chip used to calculate the current time. Through the LCD to display the current time and date, as well as the data set to fight bell. FLASH data set used to store, so as to ac
6、hieve the data is not lost after power-down purposes. Ling the playing device 30 can be set up to fight road bell time, cycle every day can be set off-day weekend or do not play a single bell. Power-down time can be maintained after the current time and the best data set, do not have to set up each time after power-down time and set the current data. Key words SPCE061A single-chip; DS1337C chip;Automatic clock bell;Automatic control circuit 5 前前 言言 传统的学校广播系统都是按公共广播系统建造的, 它需要人工手动控制广播 系统的播