1、 摘摘 要要 随着微机测量和控制技术的迅速发展与广泛应用, 以单片机为核心的温度采 集与控制系统的研发与应用在很大程度上提高了生产生活中对温度的控制水平。 本设计论述了一种以 STC89C52 单片机为主控制单元。该控制系统可以实时存储 相关的温度数据。系统设计了相关的硬件电路和相关应用程序。硬件电路主要包 括 STC89C51 单片机最小系统,测温电路、实时时钟电路、LED 显示以及通讯模 块电路等。系统程序主要包括主程序,读出温度子程序,计算温度子程序、按键 处理程序、LCD 显示程序以及数据存储程序等。 关键词关键词: STC89C52 单片机;DS18B20;显示电路 1 Abstra
2、ct Along with the computer measurement and control technology of the rapid development and wide application, based on singlechip temperature gathering and control system development and application greatly improve the production of temperature in life level of control. This design STC89C52 describes
3、 a kind of mainly by MCU control unit, for temperature sensor DS18B20 temperature control system. The control system can real-time storage temperature data and record related to the current time. System design related hardware circuit and related applications. STC89C52 microcontroller hardware circu
4、it include temperature detection circuit smallest system, and real-time clock circuit, LCD display circuit, communication module circuit, etc. System programming mainly include main program, read temperature subroutine, the calculation of temperature subroutines, key processing procedures, LCD displ
5、ay procedures and data storage procedures, etc. Keywords :STC89C52 microcontroller;DS18B20;display circuit 2 第第 1 1 章章 5151 单片机结构单片机结构和原理和原理 单片微型计算机简称单片机,也称为微控制器(Micro Controller Unit), 英文缩写为 MCU.单片机的结构及功能均是按照工业控制要求而设计的,它把微 型计算机的宫格功能部件(中央处理器 CPU、随机存取存储器 RAM、只读存储器 ROM、输入输出 I/O 接口、定时器/计数器以及串行通信接口等)集成在
6、一块芯片 上,构成一个完整的微型计算机,故又称为单片微型计算机。除工业领域外,单 片机还广泛应用于各种民用电子、电器之中。 MCS-51 是由美国 INTEL 公司 20 世纪 80 年代生产的一系列 8 位单片机的总称, 此系列单片机包括很多型号,如:8031、8051、8751、8032、8052 等,其中 8051 是最早最典型的产品。该系列其他单片机都是在 8051 的基础上进行功能的增、 减改变而来的,所以人们习惯用 8051 来称呼系列单片机,而 其中的在世纪年代末年代初是我国最流行的单片机之一。 公司后来将 MCS-51 的核心技术授权给了其他公司,现在生产 8051 内核单片机的公司,主要有 ATMEL、WINBOND、NXP、 等。 随着技术的发展, 各种高性能的位、 位不断出现, 但以、 、 以及等系列为典型代表的位, 由于成本低、 开发工具完善、易学易用等特点,仍具有强大的生命力和极高的实使用价值。 . . 单片机的结构单片