这个项目把温度从探头送到屏幕上。DS18B20 用 1-Wire 给出数字温度,8051 读出数据并通过串口送出,LabVIEW 用 VISA 接收并显示。页面记下这条链路,也记下还要补上的实验笔记:时序、数据帧,以及读超时到底是谁的问题。
以下正文为英文。
Why this exists
The interesting step is not the thermometer. It is the crossing. A temperature on a probe is not yet a number in a program, and a number in a microcontroller is not yet a trace an engineer can watch. This project was built to make that crossing visible: sensor, controller, serial link, instrument software.
How it is put together
The sensor is a DS18B20, a digital thermometer on the 1-Wire bus. It does not hand over a voltage to be interpreted. It hands over a reading. The controller is an 8051-family microcontroller. It has no native 1-Wire peripheral, so the bus is driven in software: reset, presence, command, and the bits of the scratchpad. The reading is then framed and sent out through the UART.
On the computer, LabVIEW opens that serial port with VISA and draws the value. The screen is the last instrument in the chain, not a decoration on top of it. If the line on the chart is wrong, the fault can sit anywhere from the probe to the session that opened the port.
What is easy to get wrong
Three places deserve their own notes, and this page is where they will land as they are written up from the bench.
- 1-Wire timing on an 8051. The presence pulse is easy to miss, and a late sample looks like a missing sensor.
- The serial frame. Baud, stop bits, and what one message actually contains have to match on both ends.
- A VISA read that times out. The dialog only says that time ran out. The cause may be the port, the baud rate, the termination character, the cable, or a session that was never opened.
I am not going to invent a postmortem for this page. A timeout is a symptom. The notebook entry comes after the cause is known, not before.
Where the record stands
The chain was built: sensor, microcontroller, serial link, LabVIEW display. What this archive still owes the project is the lab detail — the frame format, the timing that proved reliable, and one honest account of a fault. Those notes will be added here, not replaced with a list of part numbers.