摘要在现代工业生产或日常生活中,各种各样的温度测试系统应用范围越来越广。传统的温度采集方式是采用热电偶或热电阻,由于其输出为模拟信号,必须经过A/D转换环节获得数字信号后才能与单片机等微处理器连接,使得硬件电路结构比较复杂,制作成本高。随着半导体技术的飞速发展,以美国DALLS公司生产的DS18B20为代表的新型单总线数字式温度传感器得到了广泛应用。DS18B20具有直接输出温度数字量,无需外接复杂的A/D转换电路的特点,从而简化了系统硬件构造和软件编程。84386
所以,该课题是设计一种基于PIC16F877A单片机与DS18B20的温度测试系统,设计思路是采用模块化设计,整个温度测试系统主要由5个模块组成:温度采集模块,单片机控制模块,温度显示模块,蜂鸣器报警模块和上位机模块。每个模块设计又分为硬件设计和软件设计。由于设计基础是TX-5A开发板,所以不需进行硬件设计,但硬件电路的分析是必不可少的,以便于后面的软件设计。在每个模块设计完成后,将模块进行集成,完成温度测试系统的设计。
通过温度测试系统的硬件电路分析和软件程序设计,使该系统可以实现温度的采集、显示、报警和上位机通信功能。系统由温度传感器DS18B20采集温度,然后将温度直接转变成数字信号送入PIC16F877A单片机进行实时处理,通过6位8段共阴极数码管将温度显示出来,超过温度报警值上下限则蜂鸣器开始报警。另外,采集结果又通过RS-232串口送入VB6。0编写的上位机软件中进行温度显示,并且实现曲线反映实时温度变化的功能。
毕业论文关键词:温度测试系统、DS18B20、模块化设计、上位机控制
Abstract In the modern industrial production and daily life, the scope of application of the temperature test system becomes more and more widely。The traditional method of temperature acquisition is using thermocouple or RTD, because its output is analog signal, it can link with chip microprocessor fter A/D conversion when became digital signal , the hardware circuit of complex structure and the production cost is high。 With the rapid development of semiconductor technology, The DS18B20 produced by the American DALLS company as the representative of the new single bus digital temperature sensor has been widely used 。DS18B20 has a direct digital output temperature characteristics, without external complex A/D conversion circuit, thereby simplifying the system hardware structure and software programming。
So, the topic designs a temperature testing system based on PIC16F877A and DS18B20。 The design is modularized , the system includes five modules: temperature acquisition, control, temperature display, buzzer alarm and host PC。 Each module is pided into hardware design and software design。 The design is based on TX-5A development board, so there is no need to hardware design, but hardware circuit analysis is essential, in order to facilitate the software design。 After the completion of each module design, module, to complete the design of temperature testing system。
Through the hardware circuit analysis and software design, the system can achieve the temperature acquisition, display, alarm and host PC communication。 The system uses the DS18B20 collecting temperature, then the temperature directly becomes a digital signal into the microcontroller PIC16F877A for real-time processing, the digital tube to display the temperature, over temperature alarm value of the upper and lower limits of the buzzer to alarm。 Also, collecting the results by RS-232 serial port into VB6。0 host PC software temperature display, and realize the curve reflect the function of the real-time temperature changes。