摘要
给出一种基于DS18B20的1-Wire总线的嵌入式测温系统的软硬件设计,详细介绍了数字温度传感器DS18B20和桥接器DS2480B的内部结构、工作原理及使用方法;给出基于1-Wire操作的时序图和部分驱动代码,并对代码做出比较详细的说明。给出系统硬件电路逻辑,并对硬件电路中的细节问题做了说明。在以往的应用中,大多为PC机通过串口控制测温芯片DS18B20和桥接器DS2480B进行温度测量。采用单片机C8051F040代替传统的PC机,通过片上UART对测温芯片进行控制,在空间狭小的特殊嵌入式环境中对温度值进行采集。经实践证明电路系统工作正常,温度采集效果良好。
The software and hardware design of 1 -wire embedded temperatare measurement system based on DS18B20 are proposed, the interior structure,work protocol and using method of DS18B20 and DS2480B are introduced. The time sequence pictures and driving code of I - wire operation, the circuit logic of system's hardware are given. In the past applications, the temperatare measuremant mostly for the PC - chip through the serial port control DS18B20 and bridges DS2480B. In this paper,C8051F040 is applied to instead of the traditional PC, through on - chip UART chip to control the temperature in the special environment. Practice proves that the circuit system is working normal, the temperature acquisition is good.
出处
《现代电子技术》
2009年第4期162-165,168,共5页
Modern Electronics Technique