摘要:温度是一个很重要的物理参数,是表征物体冷热程度的物理量,在工程和科学研究的很多场合中都需要测量温度。利用高性能嵌入式ARM的Cortex-M3内核微控制器芯片STM32设计多通道测温系统,并给出了硬件设计的原理框图。重点阐述了温度采集端、报警电路和上下位机通信部分,并进行了相关软件的设计。由于DSl8B20和STM32芯片内部集成度比较高,从而简化了硬件结构。系统带有RS232串行口与远程上位机进行通信,实现远程上位计算机数据实时监控的需要。该系统具有扩展方便、可靠性高、配置简单和成本低等特点。经工业现场实际应用,该测量系统各项技术指标均达到了设计要求。52051
毕业论文关键词:多通道测温,DSl8B20,STM32,串口通信
Abstract:Temperature is a very important physical parameter ,and it is the physical objects and degree in engineering and scientific research in many occasions to measuring temperature .A method of designing multi-point thermometer is introduced in the paper, which is based on embedded and high performance Cortex-M3 micro-controller STM32.The hardware circuit of temperature capture terminal , alarm circuit ,upper and lower machine communication part are presented and the related software is designed Since DSl8B20 and STM32 micro controller is highly integrated,the hardware structure of the thermometer is simplified .System with a RS232 serial port is used to communicate with the remote host computer ,this part can realize the needs of remote host computer data real-time monitoring .It is convenient to extend and is outstandingly reliable, simple in con—figuration and low cost. The practical application of industrial field, the technical indicators of this measuring system have reached the design requirements.Keywords:multi-channel temperature measuring, DS18B20, STM32, machine communication
目 录
1 绪论 4
1.1选题背景 4
1.2系统框架图 4
2 硬件设计 5
2.1 ARM芯片选择 5
2.2温度采集端 5
2.2.1DS18B20的优势 6
2.2.2DS18B20的使用场所 6
2.2.3温度采集端电路图 6
2.3液晶屏选择 7
2.4报警电路 8
2.6矩阵键盘 9
3.1主程序流程图 11
3.2 初始化程序 12
3.2.1时钟配置的步骤 12
3.2.2端口的配置 13
3.3中断程序 13
3.4矩阵键盘扫描程序设计 14
3.5 DS18B20程序设计 15
3.5.1 复位程序设计 16
3.5.2等待程序设计 16
3.5.3 读取一位程序设计 17
3.5.4 读取一字节程序设计 17
3.5.5 写一字节程序设计 18
3.5.6 温度开启程序设计 19
3.5.7 温度转换程序设计 19
3.6串口通信程序: 20
3.6.1 STM32的USART