黄英_《单片机原理及应用》讲义课件.ppt

黄英_《单片机原理及应用》讲义课件.ppt

ID:57149793

大小:509.00 KB

页数:57页

时间:2020-08-01

黄英_《单片机原理及应用》讲义课件.ppt_第1页
黄英_《单片机原理及应用》讲义课件.ppt_第2页
黄英_《单片机原理及应用》讲义课件.ppt_第3页
黄英_《单片机原理及应用》讲义课件.ppt_第4页
黄英_《单片机原理及应用》讲义课件.ppt_第5页
资源描述:

《黄英_《单片机原理及应用》讲义课件.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、Chapter3:InstructionsystemMicrocontrollerPrincipleandApplication主讲教师:黄英1Contents:3.1InstructionformatandAddressingModes3.2InstructionIntroductionChapter3Instructionsystem2•AssembleLanguage:symboliclanguage•Assembler:Acomputerprogramusedtoassemble•SourceProgramAssemblerObjectprogram(Sourcec

2、odes)(Machinecodes)•InstructionSet:cannottransplantdirectlyChapter3Instructionsystem3.1InstructionformatandAddressingModes33.1InstructionformatandAddressingModes3.1.1Instructionformat•Instruction=opcodeoperand=opcodedestinationoperand,sourceoperand•Instructiontypes:1-byteInstruction:includes

3、opcodeandoperand2-byteInstruction:1thbyteisopcode2thbyteisoperand3-byteInstruction:1thbyteisopcode2th,3thbyteareoperands43.1InstructionformatandAddressingModes•Addressing:howtogetthelocationof(source)operand.•AddressingModes:7types1.RegisterAddressing2.DirectAddressing3.RegisterIndirectAddre

4、ssing4.ImmediateConstantsAddressing5.IndexedAddressing6.BooleanAddressing3.1.2AddressingModes7.RelativeAddressing(getthejumpingdestinationaddressofPC)53.1.2AddressingModes1.RegisterAddressing•Operand:denotedbyregister.Forexample:MOVA,R0•AddressingRange:①Generalregister:4banks×8(R0~R7)=32regi

5、sters②SomeSFRs:A,AB,DPTR,etc.63.1.2AddressingModes•Operand:denoteddirectlyby8-bitaddress.Forexample:MOVA,3AH•AddressingRange:①Lower128bytesofinternalRAM②SFRs2.DirectAddressing73.1.2AddressingModes•Operand:specifiesaregistertocontainoperandaddresswiththeprefix“@”.•AddressingRange:①Lower128byt

6、esofinternalRAM(8-bitaddress)②64KBofexternalRAM(16-bitaddress)3.RegisterIndirectAddressing•addressregisterof8-bitaddress:Ri(i=0,1)SP(PUSH,POP)addressregisterof16-bitaddress:DPTRForexample:MOVA,@R0MOVXA,@DPTR83.1.2AddressingModes•Operand:specifiesthevalueofa8-bitor16-bitconstantwiththeprefix“

7、#”.Forexample:MOVA,#3AHMOVDPTR,#0200H4.ImmediateConstantsAddressing93.1.2AddressingModes•Onlythreeinstruction:MOVCA,@A+DPTRMOVCA,@A+PCJMP@A+DPTR•AddressingRange:ProgramMemory(ROM)5.IndexedAddressing•ProgramMemorycanonlybeaccessedviathismode.•Design

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。