ABSTRACT:With the rapid development of modern information technology,
microcontroller technology has become quite common, real-time detection and automatic control in the microcomputer application systems, microcontroller is often used as a core component to use.
This paper introduces a single-chip control device for main AT89S52 for temperature sensor DS18B20, to transmit data by LED screen, realize temperature display of the new digital thermometer. This digital thermometer measurement range is -10 ~ 120 ℃, the display resolution ℃ for 0.1 ℃, error acuities + 0.5.As a result of the temperature sensor DS18B20 as the test components compared with the traditional thermometer, this paper designed digital thermometer reduce external hardware circuit, which readings convenient, temperature measuring range, temperature measurement precision, the digital display characteristics, wide application scope. DS18B20 thermometer can still in high temperature alarm, long-range multi-point measurement temperature control aspects of application development. The system structure is simple, strong anti-jamming capability, suitable for all kinds of environment temperature measurement on the site, and can be widely used in industrial control temperature system, thermometer, consumer products and other temperature measurement and control system.
Keywords: SCM AT89S52 single; Temperature sensor DS18B20; LED display
附录 A 主电路原理图
附录 B 实物图
附录 C 程序
TEMPL EQU 21H
TEMPH EQU 22H
TEMPLC EQU 23H TEMPHC EQU 24H TEMPHEAD EQU 25H FIRST BIT 00H TEMPDIN BIT P3.7 FLAG BIT 01H
ORG 0000H LJMP START ORG 002BH
START:MOV SP,#4AH CLSMEM:MOV R0,#20H
MOV R1,#5FH
CLSMEM1:MOV R0,#00H INC R0
DJNZ R1,CLSMEM1 MOV PSW,#00H LJMP MAIN
MAIN:LCALL DISP0 JNB FIRST,MAIN2
LCALL READTEMP1 LCALL CONVTEMP LCALL DISPBCD LCALL DISP0
MAIN2:LCALL READTEMP
SETB FIRST
LCALL DISP0 SJMP MAIN
INITDS1820:SETB TEMPDIN
相关推荐: