单片机温度检测系统的汇编实现(compilation of temperature detection system for single chip microcomputer)

单片机温度检测系统的汇编实现(compilation of temperature detection system for single chip microcomputer)

ID:13057379

大小:68.50 KB

页数:48页

时间:2018-07-20

单片机温度检测系统的汇编实现(compilation of temperature detection system for single chip microcomputer)_第1页
单片机温度检测系统的汇编实现(compilation of temperature detection system for single chip microcomputer)_第2页
单片机温度检测系统的汇编实现(compilation of temperature detection system for single chip microcomputer)_第3页
单片机温度检测系统的汇编实现(compilation of temperature detection system for single chip microcomputer)_第4页
单片机温度检测系统的汇编实现(compilation of temperature detection system for single chip microcomputer)_第5页
资源描述:

《单片机温度检测系统的汇编实现(compilation of temperature detection system for single chip microcomputer)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、单片机温度检测系统的汇编实现(Compilationoftemperaturedetectionsystemforsinglechipmicrocomputer)Digitalthermometerassemblylanguagesourcecodeisasfollows:******************************temperaturevalue*****************storageunit;TEMP_ZHEQU24H;realtimetemperaturevaluestorageunitTEMPLEQU25H;l

2、owtemperaturevaluestorageunitTEMPHEQU26H;hightemperaturevaluestorageunitTEMP_THEQU27H;hightemperaturealarmvaluestorageunitTEMP_TLEQU28H;lowtemperaturealarmvaluestorageunitTEMPHCEQU29H;keeptendigitBCDcodesTEMPLC,EQU,2AH;BCDcodesforindividualbits****************************;k

3、eyinputpindefinition******************K1EQUP1.0K2EQUP1.1K3EQUP1.2K4EQUP1.3SPKEQUP3.7;buzzerZFEQU22H.1XEQU2FH;setsthedisplayposition****************************LCDcontrol*************************pin;RSEQUP2.0RWEQUP2.1EEQUP2.2FLAGEQU21H.0;temperaturesensorflagbitKEY_UDEQU21H.

4、1DQEQUP3.3;temperaturesensordataacquisitionportThemainprogram***********************************************************;ORG0000HLJMPMAINORG0023HORG0030HMAIN:,MOV,SP,#5FHMOVTMOD,#20H;thetimerT1isthe2(autoreload8bitcounter)MOV,TH1,#0F3H;setthetimerinitialvalue,MOV,TL1,#0F3HS

5、ETBTR1;timerstartMOV,TEMP_TH,#27MOV,TEMP_TL,#20ACALLSET_LCD;LCDinitializationsettingsubroutineTOOP:ACALLRESET_1820;callthe18B20resetsubroutineJNB,FLAG,TOOP1;DS1820doesnotexist,thenjumpACALLXS_S;callthe"SUCCES"informationsubroutineACALLWR_THL;writesthealarmupperandlowerlimit

6、stothescratchpadregistersubroutineACALLRE_THL;copiesthetemperaturealarmvaluesintheE2ROMbacktotheregistersJMPTOOP2TOOP1:ACALLXS_WRONG;displays"WRONG"informationSJMPTOOP;returns,continuestojudgeTOOP2:ACALLRE_TEMP;callreadtemperaturedatasubroutineACALLSET_DATA;callprocessingto

7、displaytemperaturedatasubprogramACALLTEMP_COMP;theactualtemperaturevalueiscomparedwiththemarkedtemperaturevaluesubroutineACALLP_KEY;callkeyscansubroutineJMPTOOP2;loop****************************;;readthetemperaturedata**************************subroutineRE_TEMP:JNB,FLAG,TOO

8、P1;determinewhetherDS18B20existsACALLRESET_1820;18B20resetsubroutineMOV,A,#0CCH;sk

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。