文件名称:easy51
介绍说明--下载内容均来自于网络,请自行研究使用
123456uyygbb温度传感器ds1820 的汇编程序
晶振:12M
TEMPER_L EQU 36H
TEMPER_H EQU 35H
TEMPER_NUM EQU 60H
FLAG1 BIT 00H
DQ BIT P3.3
AAA:MOV SP,#70H
LCALL GET_TEMPER
LCALL TEMPER_COV
LJMP AAA
NOP
------------------读出转换后的温度值
GET_TEMPER:
SETB DQ 定时入口
BCD:LCALL INIT_1820
JB FLAG1,S22
LJMP BCD 若DS18B20不存在则返回
S22:LCALL DELAY1
MOV A,#0CCH 跳过ROM匹配------0CC
LCALL WRITE_1820
MOV A,#44H 发出温度转换命令
LCALL WRITE_1820-Ds1820 temperature sensor 123456uyygbb the assembler crystal: 12MTEMPER_L EQU 36HTEMPER_H EQU 35HTEMPER_NUM EQU 60HFLAG1 BIT 00HDQ BIT P3.3AAA: MOV SP,# 70HLCALL GET_TEMPERLCALL TEMPER_COVLJMP AAANOP read out the converted temperature value GET_TEMPER: SETB DQ regularly import BCD: LCALL INIT_1820JB FLAG1, S22LJMP BCD if DS18B20 does not exist is returned S22: LCALL DELAY1MOV A,# 0CCH Skip ROM matching 0CCLCALL WRITE_1820MOV A,# 44H issued a temperature conversion command LCALL WRITE_1820
晶振:12M
TEMPER_L EQU 36H
TEMPER_H EQU 35H
TEMPER_NUM EQU 60H
FLAG1 BIT 00H
DQ BIT P3.3
AAA:MOV SP,#70H
LCALL GET_TEMPER
LCALL TEMPER_COV
LJMP AAA
NOP
------------------读出转换后的温度值
GET_TEMPER:
SETB DQ 定时入口
BCD:LCALL INIT_1820
JB FLAG1,S22
LJMP BCD 若DS18B20不存在则返回
S22:LCALL DELAY1
MOV A,#0CCH 跳过ROM匹配------0CC
LCALL WRITE_1820
MOV A,#44H 发出温度转换命令
LCALL WRITE_1820-Ds1820 temperature sensor 123456uyygbb the assembler crystal: 12MTEMPER_L EQU 36HTEMPER_H EQU 35HTEMPER_NUM EQU 60HFLAG1 BIT 00HDQ BIT P3.3AAA: MOV SP,# 70HLCALL GET_TEMPERLCALL TEMPER_COVLJMP AAANOP read out the converted temperature value GET_TEMPER: SETB DQ regularly import BCD: LCALL INIT_1820JB FLAG1, S22LJMP BCD if DS18B20 does not exist is returned S22: LCALL DELAY1MOV A,# 0CCH Skip ROM matching 0CCLCALL WRITE_1820MOV A,# 44H issued a temperature conversion command LCALL WRITE_1820
(系统自动生成,下载前可以参看下载内容)
下载文件列表
a51.exe
E51Pro.hex
说明.txt
E51Pro.hex
说明.txt