单片机原理与接口技术 (24).pdf

上传人:奉*** 文档编号:67732766 上传时间:2022-12-26 格式:PDF 页数:11 大小:1.66MB
返回 下载 相关 举报
单片机原理与接口技术 (24).pdf_第1页
第1页 / 共11页
单片机原理与接口技术 (24).pdf_第2页
第2页 / 共11页
点击查看更多>>
资源描述

《单片机原理与接口技术 (24).pdf》由会员分享,可在线阅读,更多相关《单片机原理与接口技术 (24).pdf(11页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、单片机原理与接口技术MCS-5129ADD4ADDC4SUBB4MUL()DIVINC1DEC110124241717MOV MOVA#datadirectRiRnA#dataA(direct)A(Ri)A(Rn)22111111Rn#datadirectARn#dataRn(direct)Rn(A)221121direct#dataAdirectRiRndirect#datadirect(A)direct(direct)direct(Ri)direct(Rn)3232221221Ri#datadirectA(Ri)#data(Ri)(direct)(Ri)(A)221121MOV ARn A

2、(Rn)n=07 MOV Adirect A(direct)MOV ARi A(Ri)i=01MOV A#data AdataMOV Rn,direct Rn(direct)MOV Ri,direct (Ri)(direct)MOV direct1direct2 direct1(direct2)MOV DPTR#data16 DPTRdata161161A=30H(4FH)=30HR0=20H(20H)=30H(21H)=30HMOV A#30H MOV 4FHA MOV R0#20H MOV R04FH MOV 21H20H RAM 60HA2MOV A,60HMOV A,#60HMOV R

3、0#60H MOV AR0MOV R060HMOV AR060H32H32H58H1.MOV R1R2MOV R2R02.R0R1MOV AR23.SFRMOV R0#80HMOV AR0MOV#80HR2(2000H)(2100H)AMOVX DPTR1664KBRAMMOVX ADPTRA(DPTR)MOVX DPTRA(DPTR)(A)Ri8256BRAMMOVXARiA(Ri)MOVXRiA(Ri)(A)MOVX A2000H MOVX 2100H2000HDPTR=2000HA=XDPTR=2100H(2100H)=XMOV DPTR#2000HMOVX ADPTRMOV DPTR#

4、2100HMOVX DPTRAA1.DPTRMOVCAA+DPTRA(A+DPTR)64KB ROM2.PCMOVC AA+PC A(A)+(PC)+1)256BY=X2X(0X15)RAM20HYRAM21HSQU:MOV DPTR#TAB MOV A20HX)MOVC AA+DPTRY=X2MOV 21HAYRETORG 3000HTAB:DB 00010409225ORG 1000HY=X2X(0X15)RAM20HYRAM21HORG 1000H 1000H SQU:MOV A20HX1002H ADD A#3 1004HMOVC AA+PCY=X21005HMOV 21HA1007H

5、RET1008H TAB:DB 000104 100BHDB 09225 A=02B=56HSP=?A=?B=?SPSP56HSPSP0202HA00H02H00H02HSPSP56H0202HSPSPSPSP02PUSH n SP SP+1(SP)(n)POP n (n)(SP)SP SP-130H02H56HSBRMOV SP#30H PUSH ACCPUSH BMOV A#0MOV B#01POP BPOP ACC()RAM1.XCH ARn A RnXCH ARiA(Ri)XCH Adirect A(direct)2.XCHD ARi A03 (Ri)03 SWAP AA47 A03A

6、=29HXCH A2AHA=?(2AH)=?38H29H29HRAM 2AH2BHBCDBCD20HMOV A#0 MOV R0#2AH MOV R1#2BHXCHD AR0SWAP AXCHD AR1XCH A20H1.MOV A#1000H A1000H2.MOVX A1000HA(1000H)RAM3.MOVC A1000H A(1000H)ROM4.MOVX 60HARAM(60H)A5.MOV R060HRAM(61H)(60H)MOV 61HR06.XCH R1R2R1R27.MOVX DPTR#2000H DPTR2000H8.MOVX 60HDPTR RAMRAM1.MOV DPTR#1000H 2.MOV DPTR#1000H MOVX ADPTR 3.MOV DPTR#1000H MOV A,#0 MOVC AA+DPTR4.MOV R0#60H MOVX AR0 5.MOV R0,#60H MOV 61H,R06.XCH AR1 XCH AR2 7.MOV DPTR#2000H 8.MOVX A,DPTR MOV 60H,A启迪智慧思维创造精彩人生

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 大学资料

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁