资源描述:
《单片机实验单片机实验程序》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、单片机实验程序实验一ORG00HAJMPMAINORG01OOHMAIN:MOVR4,#01HMOVP3,#0FFHLP4:JBP3.4,LP5MOVP1,#OOHAJMPLP4LP5:JNBP3.5,$START:MOVA,P3ANLA,07HINCAMOVB,AADDA,BMOVR3,AACALLDELAYMOVA,R4JNBP3.3,RRLAAJMPOUTR:RRAOUT:MOVR4,AMOVP1,R4AJMPLP4DELAY:LPO:MOVR2,#250LP1:MOVR1,#250LP2:NOPNOPDJNZR1,LP2
2、DJNZR2,LP1DJNZR3,LP0RETEND*1**!•*1**!••土*!•*1**!••土*!••土*A**A*•土*A«*A**A«•土*A**A*•丄**A*•丄**A**A*•丄**A*•丄■•丄■•丄■•丄■•丄*•士•士•士•士•士•卜•[“•士•士•[“•士"“•士•士•[“■士4“<7^<7^<7^3、%%1«%2^•£>%2^%1«•“•丄■•丄■•丄■•丄■•丄■•丄■•土•丄■^7^^7^#T%^7^#T>^7^#T%^7^#T>^7w#T%#T%#T%#T%#T^^T%#T%吓・#T%吓・#T%吓・#T%吓・#T%吓・#T%吓・
4、^7^吓・^7^*■^7^彳.#7^彳・ORG0000HLJMPMAINORG01OOHMAIN:MOVP1,#OHMOVR4,#0HMOVA,#1HJIAN:MOVR4,AMOVP3,#0FFHJBP3.4,ZMOVP1,#OHDEN:MOVP3,#0FFHJNBP3.4,DEN;K4为0,关MOVR4,AZ:MOVP3,#OFFHJNBP3.5,$;K5为0,停MOVP3,#0FFHMOVA,P3ANLA,#07HINCAMOVR3,AACALLDLYMOVA,R4MOVP3,#0FFHJBP3.3,ZUORRAAJMPXI
5、ANZUO:RLAAJMPXIANXIAN:MOVPl,AAJMPJIANDLY:LPO:MOVR2,#0FFHLP1:MOVR1,#OFHLP2:N0PNOPDJNZR1,LP2DJNZR2,LP1DJNZR3,LP0RETEND•土•土•土•土•土•土•土•丄■•丄1^*1^*1^*1^*1^•丄■*!*•土•丄■•丄■•丄■•土•丄“*S«•丄“•丄■*&••丄“*S«•丄■*!••丄■■卜•丄■•丄■•卜•丄■•丄■•卜•丄■■卜•丄■%2^•丄■%2^•丄■%2>•丄■%2^•丄■%2^•丄■%2^%1«•“•“%2>
6、•丄■•丄■•丄■•丄■•丄■•丄■•土•丄■^7^^7^#T%^7^#T>^7^#T%^7^#T>^7w#T%#T%#T%#T%#T^^T%#T%吓・#T%吓・#T%吓・#T%吓・#T%吓・#T%吓・^7^吓・^7^*■^7^彳.#7^彳・;;单片机实验1;;开关量输入、输出的控制设计;;led201422;程序跳转ORG0000HAJMPMAINMAIN:MOVSP,#()030HMOVA,#01HMAIN_LOOP:ACALLKEYLEDMODEL2;ACALLKEYLEDMO
7、DEL1AJMPMAIN_LOOP==============================子;读取开关K,用LED状态显示KEY_LED_MODEL1:MOVA,#0C0HMOVP1,#OFFHORLA,P1MOVP3,ARET;L0-L5依次亮;K0-K2控制速度;K5启动关闭移位()停;K6控制方向1L;0R-…>L7;K7总开关0全部关闭;初始化A00100000B•丄*•丄■•丄*•丄■•丄■•丄*•士•士•士•士•士•卜•士•士•[“•士•士•士•[“■士4“;绝对跳转;设置堆栈指针;初始化流水灯函数区<7^<7^
8、<7^#7%^7^^T*^7^