單片機溫度檢測系統(tǒng)的匯編實現(xiàn)(compilation of temperature detection system for single chip microcomputer)

單片機溫度檢測系統(tǒng)的匯編實現(xiàn)(compilation of temperature detection system for single chip microcomputer)

ID:13057379

大?。?8.50 KB

頁數(shù):48頁

時間:2018-07-20

單片機溫度檢測系統(tǒng)的匯編實現(xiàn)(compilation of temperature detection system for single chip microcomputer)_第1頁
單片機溫度檢測系統(tǒng)的匯編實現(xiàn)(compilation of temperature detection system for single chip microcomputer)_第2頁
單片機溫度檢測系統(tǒng)的匯編實現(xiàn)(compilation of temperature detection system for single chip microcomputer)_第3頁
單片機溫度檢測系統(tǒng)的匯編實現(xiàn)(compilation of temperature detection system for single chip microcomputer)_第4頁
單片機溫度檢測系統(tǒng)的匯編實現(xiàn)(compilation of temperature detection system for single chip microcomputer)_第5頁
資源描述:

《單片機溫度檢測系統(tǒng)的匯編實現(xiàn)(compilation of temperature detection system for single chip microcomputer)》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫

1、單片機溫度檢測系統(tǒng)的匯編實現(xiàn)(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

當(dāng)前文檔最多預(yù)覽五頁,下載文檔查看全文

此文檔下載收益歸作者所有

當(dāng)前文檔最多預(yù)覽五頁,下載文檔查看全文
溫馨提示:
1. 部分包含數(shù)學(xué)公式或PPT動畫的文件,查看預(yù)覽時可能會顯示錯亂或異常,文件下載后無此問題,請放心下載。
2. 本文檔由用戶上傳,版權(quán)歸屬用戶,天天文庫負(fù)責(zé)整理代發(fā)布。如果您對本文檔版權(quán)有爭議請及時聯(lián)系客服。
3. 下載前請仔細(xì)閱讀文檔內(nèi)容,確認(rèn)文檔內(nèi)容符合您的需求后進行下載,若出現(xiàn)內(nèi)容與標(biāo)題不符可向本站投訴處理。
4. 下載文檔時可能由于網(wǎng)絡(luò)波動等原因無法下載或下載錯誤,付費完成后未能成功下載的用戶請聯(lián)系客服處理。