已閱讀5頁,還剩9頁未讀, 繼續(xù)免費閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
JITIN EQU P0.0 SZDAN EQU P0.1 KUAIJN EQU P0.2 ZHZHAN EQU P0.3 KUAITUI EQU P0.4 ZHZHSRU EQU P0.5 GJFSXZ EQU P0.6 YANSHIR EQU P0.7 YDWEI EQU P3.2 GONGJIN1 EQU P3.3 GONGJIN2 EQU P3.4 JIESHUWEI EQU P3.5 ZZSHUC_Y0 EQU P1.0 KJSHUC_Y1 EQU P1.1 KTSHUC_Y2 EQU P1.2 YSSHUC_Y3 EQU P1.3 GJSHUC_Y4 EQU P1.4 WDT_CONTR EQU 0E1H ; 開看門狗 WDT_CONTR_1 EQU 00111010B ; 開看門狗;-;初始化;- ORG 0000H LJMP MAIN ORG 000BH AJMP TIME0 ORG 0030H;-;初始化設(shè)置;-MAIN: CALL YS20MS MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV SP,#50H MOV SP,#50H MOV TMOD,#00000001B MOV TH0,#00H MOV TL0,#10H SETB EA SETB ET0 SETB TR0 CALL YS20MS MOV P0,#0FFH MOV P1,#0FFH MOV P2,#0FFH MOV P3,#0FFH MOV SP,#50H MOV TMOD,#00000001B MOV TH0,#00H MOV TL0,#10H SETB EA SETB ET0 SETB TR0 MOV WDT_CONTR,#WDT_CONTR_1 ;開看門狗,290ms,;-;按鍵檢測;-LOOP0: JB JITIN,LOOP1 NOPLOOP1: JB JITIN,LOOP2 CALL YS20MS JB JITIN,LOOP2 MOV P1,#0FFH NOP MOV P1,#0FFH AJMP LOOP0 NOP AJMP LOOP0LOOP2: NOP JB SZDAN,LOOP5 CALL YS20MS JB SZDAN,LOOP5 AJMP START10 NOP AJMP START10 NOPLOOP5: AJMP START50 NOP AJMP START50;-;自動運行;-START10: NOP JB JITIN,START11 CALL YS20MS JB JITIN,START11 AJMP LOOP0 NOP AJMP LOOP0START11: NOP JB SZDAN,START14 CALL YS20MS JB SZDAN,START14START12: NOP JB GJFSXZ,START13 START13: CALL YS20MS JB GJFSXZ,START15 CALL YS20MS JB GJFSXZ,START15 AJMP START30 NOP AJMP START30START14: NOP MOV P1,#0FFH NOP MOV P1,#0FFH AJMP LOOP0 NOP AJMP LOOP0;-;-;-START15: NOP JB ZHZHAN,START10 CALL YS20MS JB ZHZHAN,START10 NOP JB YDWEI,START10 CALL YS20MS JB YDWEI,START10 JNB JITIN,START10 CALL YS20MS JNB JITIN,START10 CLR ZZSHUC_Y0 NOP CLR ZZSHUC_Y0 CALL YS1S ;-;-START16: NOP JNB GONGJIN1,START19 CALL YS20MS JNB GONGJIN1,START19START17: NOP JB ZHZHSRU,START180 CALL YS20MS JB ZHZHSRU,START180START18: NOP JNB JITIN,START180 CALL YS20MS JNB JITIN,START180 JNB KTSHUC_Y2,START180 CALL YS20MS JNB KTSHUC_Y2,START180 CLR KJSHUC_Y1 NOP CLR KJSHUC_Y1 NOP AJMP START16 , NOP AJMP START16START180: AJMP START25 NOP AJMP START25;-;-START19: NOP SETB KJSHUC_Y1 NOP SETB KJSHUC_Y1START20: NOP JNB JIESHUWEI,START23 CALL YS20MS JNB JIESHUWEI,START23START21: NOP JB ZHZHSRU,START25 CALL YS20MS JB ZHZHSRU,START25START22: NOP JNB JITIN,START25 CALL YS20MS JNB JITIN,START25 CALL START220 AJMP START20 NOP AJMP START20;-;-START23: JNB YDWEI,START25 CALL YS20MS JNB YDWEI,START25 JNB KJSHUC_Y1,START25 CALL YS20MS JNB KJSHUC_Y1,START25 CLR KTSHUC_Y2 NOP CLR KTSHUC_Y2START24: JNB JITIN,START25 CALL YS20MS JNB JITIN,START25 NOP AJMP START23 NOP AJMP START23START25: MOV P1,#0FFH NOP MOV P1,#0FFH AJMP START10 NOP AJMP START10;-;-;- START30: NOP JB ZHZHAN,START25 CALL YS20MS JB ZHZHAN,START25 NOP JB YDWEI,START25 CALL YS20MS JB YDWEI,START25 JNB JITIN,START25 CALL YS20MS JNB JITIN,START25 CLR ZZSHUC_Y0 NOP CLR ZZSHUC_Y0 CALL YS1S ;-;-START31: NOP JNB GONGJIN1,START34 CALL YS20MS JNB GONGJIN1,START34START32: NOP JB ZHZHSRU,START25 CALL YS20MS JB ZHZHSRU,START25 NOP JNB JITIN,START25 CALL YS20MS JNB JITIN,START25 JNB KTSHUC_Y2,START25 CALL YS20MS JNB KTSHUC_Y2,START25 CLR KJSHUC_Y1 NOP CLR KJSHUC_Y1 NOP AJMP START31 NOP AJMP START31;-;-START34: NOP SETB KJSHUC_Y1 NOP SETB KJSHUC_Y1;-START35: JNB GONGJIN2,START36 CALL YS20MS JNB GONGJIN2,START36 NOP JNB JIESHUWEI,LOP0 NOP JNB JIESHUWEI,LOP0 NOP JB ZHZHSRU,LOP1 CALL YS20MS JB ZHZHSRU,LOP1 JNB JITIN,LOP1 CALL YS20MS JNB JITIN,LOP1 CALL START220 AJMP START35 NOP AJMP START35;-START36: NOP CLR YSSHUC_Y3 NOP CLR YSSHUC_Y3 JNB JIESHUWEI,LOP0 CALL YS20MS JNB JIESHUWEI,LOP0 NOP JB ZHZHSRU,LOP1 CALL YS20MS JB ZHZHSRU,LOP1 JNB JITIN,LOP1 CALL YS20MS JNB JITIN,LOP1 JB YANSHIR,START36 NOP JB YANSHIR,START36 JNB KJSHUC_Y1,LOP1 CALL YS20MS JNB KJSHUC_Y1,LOP1 CLR KTSHUC_Y2 NOP CLR KTSHUC_Y2 NOP SETB YSSHUC_Y3 NOP SETB YSSHUC_Y3;-START37: JNB GONGJIN1,START38 CALL YS20MS JNB GONGJIN1,START38 NOP JNB YDWEI,LOP1 CALL YS20MS JNB YDWEI,LOP1 JNB JITIN,LOP1 CALL YS20MS JNB JITIN,LOP1 AJMP START37 NOP AJMP START37LOP0: AJMP START42 NOP AJMP START42LOP1: AJMP START43 NOP AJMP START43;-START38: SETB KTSHUC_Y2 NOP SETB KTSHUC_Y2 CALL YS1S JNB JITIN,LOP1 CALL YS20MS JNB JITIN,LOP1 JB ZHZHSRU,LOP1 CALL YS20MS JB ZHZHSRU,LOP1 CALL YS1S JNB JITIN,LOP1 CALL YS20MS JNB JITIN,LOP1 JB ZHZHSRU,LOP1 CALL YS20MS JB ZHZHSRU,LOP1 JNB KTSHUC_Y2,LOP1 CALL YS20MS JNB KTSHUC_Y2,LOP1 CLR KJSHUC_Y1 NOP CLR KJSHUC_Y1;-START39: JNB GONGJIN2,START40 CALL YS20MS JNB GONGJIN2,START40 NOP JNB JIESHUWEI,START42 CALL YS20MS JNB JIESHUWEI,START42 NOP JB ZHZHSRU,START43 CALL YS20MS JB ZHZHSRU,START43 JNB JITIN,START43 CALL YS20MS JNB JITIN,START43 AJMP START39 NOP AJMP START39START40: SETB KJSHUC_Y1 NOP SETB KJSHUC_Y1 SETB YSSHUC_Y3 NOP SETB YSSHUC_Y3;-START41: JNB JIESHUWEI,START42 CALL YS20MS JNB JIESHUWEI,START42 NOP JB ZHZHSRU,START43 CALL YS20MS JB ZHZHSRU,START43 JNB JITIN,START43 CALL YS20MS JNB JITIN,START43 CALL START220 AJMP START41 NOP AJMP START41;-START42: JNB KJSHUC_Y1,START43 CALL YS20MS JNB KJSHUC_Y1,START43 CLR KTSHUC_Y2 NOP CLR KTSHUC_Y2 JNB YDWEI,START43 CALL YS20MS JNB YDWEI,START43 NOP JNB JITIN,START43 ; CALL YS20MS JNB JITIN,START43 AJMP START42 NOP AJMP START42;-START43: MOV P1,#0FFH NOP MOV P1,#0FFH AJMP START10 NOP AJMP START10;-;-START50: NOP JB JITIN,START51 CALL YS20MS JB JITIN,START51 MOV P1,#0FFH NOP MOV P1,#0FFH AJMP START50 NOP AJMP START50START51: NOP JB SZDAN,START52 CALL YS20MS JB SZDAN,START52 MOV P1,#0FFH NOP MOV P1,#0FFH AJMP LOOP0 NOP AJMP LOOP0;-START52: NOP JB ZHZHAN,START54 CALL YS20MS JB ZHZHAN,START54 NOP JNB JIESHUWEI,START54 CALL YS20MS JNB JIESHUWEI,START54 CLR ZZSHUC_Y0 NOP CLR ZZSHUC_Y0START53: NOP JB JIESHUWEI,START54 CALL YS20MS JB JIESHUWEI,START54 SETB ZZSHUC_Y0 NOP SETB ZZSHUC_Y0;-START54: NOP JNB GONGJIN1,START55 CALL YS20MS JNB GONGJIN1,START55 NOP JNB KTSHUC_Y2,START55 CALL YS20MS JNB KTSHUC_Y2,START55 MOV C,KUAIJN MOV KJSHUC_Y1,C AJMP START56 NOP AJMP START56START55: NOP NOP SETB KJSHUC_Y1 NOP SETB KJSHUC_Y1;-START56: NOP JNB YDWEI,START57 CALL YS20MS JNB YDWEI,START57 NOP JNB KJSHUC_Y1,START57 CALL YS20MS JNB KJSHUC_Y1,START57 MOV C,KUAITUI MOV KTSHUC_Y2,C AJMP START58 NOP AJMP START58START57: SETB KTSHUC_Y2 NOP SETB KTSHUC_Y2START58: JB JIESHUWEI,START59 CALL YS20MS JB JIESHUWEI,START59 SETB ZZSHUC_Y0 NOP SETB ZZSHUC_Y0START59: NOP AJMP START50 NOP AJMP ST
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024版建筑施工分包合同范本
- 2025年浙教版九年級科學(xué)下冊階段測試試卷
- 2024年許昌電氣職業(yè)學(xué)院高職單招職業(yè)適應(yīng)性測試歷年參考題庫含答案解析
- 2025年青島版六三制新高三歷史上冊月考試卷
- 2025年人教版必修3語文上冊階段測試試卷含答案
- 2024深圳商鋪租賃合同范本:含租金、租期及違約金條款
- 2025年中圖版選擇性必修1生物下冊月考試卷
- 2025年上教版九年級物理下冊階段測試試卷含答案
- 2025年滬教版選修2地理下冊階段測試試卷
- 2024版專業(yè)客運駕駛員勞動協(xié)議示例版B版
- 第二章 運營管理戰(zhàn)略
- 《三本白皮書》全文內(nèi)容及應(yīng)知應(yīng)會知識點
- 專題14 思想方法專題:線段與角計算中的思想方法壓軸題四種模型全攻略(解析版)
- 醫(yī)院外來器械及植入物管理制度(4篇)
- 港口與港口工程概論
- 《念珠菌感染的治療》課件
- 門店裝修設(shè)計手冊
- 考研計算機(jī)學(xué)科專業(yè)基礎(chǔ)(408)研究生考試試卷與參考答案(2025年)
- 2024護(hù)理個人年終總結(jié)
- 海南省申論真題2020年(縣級及以上)
- 蛇年金蛇賀歲
評論
0/150
提交評論