1、 ( 二二 一一 年年 六六 月月 本科毕业设计说明书本科毕业设计说明书 题题 目 :目 :多多 功功 能能 数数 字字 时时 钟钟 的的 设设 计计 摘要 数字时钟在日常生活中最常见,应用也最广泛。本次数字时钟电路根据设 计要求采用 AT89C51 单片机作为控制核心,采用 DS1302 来实现时、分、秒 24 小时计时,采用 DS18B20 来实现温度的测量,采用 LED 实现显示,采用蜂鸣器实 现报警功能。文章的核心主要是硬件设计和软件编程两个大的方面。硬件电路设 计主要包括中央处理单元电路、时钟电路、温度测量电路、键盘扫描电路、报警 电路。软件用汇编语言及 C 语言来实现,主要包括主程
2、序、时间设置子程序、温 度测量子程序、键盘扫描子程序、报警电路子程序等软件模块。电路实现了显示 时间、调整时间、测量并显示温度、报警、闹钟定时等功能,达到了设计的要求 和目的。并在伟福软件上进行了仿真和调试。 关键词: 数字时钟;AT89C51;DS1302;DS18B20;LED;蜂鸣器 AbstractAbstract Digital clock in their daily lives the most common applications and the most widely. The digital clock circuit according to design requir
3、ements using AT89C51 microcontroller as the control, using DS1302 to achieve the hours, minutes, seconds, 24 hours time, using DS18B20 to achieve the temperature measurement, using LED to achieve display, using a buzzer to achieve alarm function. The core of the article is mainly hardware design and
4、 software programming. Hardware design includes a central processing unit circuit, clock circuit, temperature measurement circuit, the keyboard scanning circuit, alarm circuit. Using assembly language and C language for software design, including the main program and time setting subroutine, temperature measurement subroutine, the keyboard scan subroutine, subroutines and other software modules alarm circuit. Circuit completed show time, adjustment time, measuring and displaying temp