- 1、本文档共4页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
单片机4-8章
Chapter 4 3. What are the pseudo instructions commonly used in the MCS-51 assembly language? What effect does each directive have?ORG addr : set starting address of the codeORG pseudo instructions always appear at the beginning of each source or data blocks can make the program, subprograms and data stored in any location fast memory. If you hold ORG instruction in the source program, the assembler 0000H unit will start making the target program. ORG control address is defined by small to large, and can not overlap.EQU : define equivalentThe operation of the address or number assigned label field data, it is also known as the equivalent instruction.DB : define byte data in code memoryThe value is stored in the table entry or entries in a row starting from the label in cellDW : define word data in code memoryEND : signal end of source fileEND command tells the assembler stop the assembler . After the END, all of the assembly languagesdo not process. Without this directive, the assembler will usually give Warning indicates.6. Provided data area from 1000H to 10FFH in external RAM, transfer the data to the area starting at 2500H in external RAM. Please write the program. START: MOV R0,#00HMOV DPTR,#1000HLOOP:MOVX A,@DPTRMOV DPH,#25HMOVX @DPTR,AMOV DPH,#10HINC DPTR INC R0DJNZ R0,LOOPSJMP $11. The crystal oscillator frequency of system is 12MHz. Write the delay subroutine with delay time of 50ms. DL50MS:MOV R4, #100DELAY1:MOV R3 , #250DELAY2:DJNZ R3, DELAY2DJNZ R4, DELAY1RET12. Analyze the role of each instruction in the following programs and show the result of corresponding register and memory unit after running.MOV A, #34H;(A)=34H MOV B, #0ABH;(B)=0ABH MOV 34H, #78H;(34H)=78H XCH A, R0;change(A),(R0)XCH A, @R0;change(A),((R0))XCH A, B;change(A),(B)SJMP $;pauseChapter 5 2. How many operation modes does the timer/counter in 8051 single chip microcomputer have ? What features do they have respectively ? 4 ,MODE0,1,2,3,4Mode0/1:In Mode 0 t
文档评论(0)