319K_Lec3 - EE319K IntroductiontoMicrocontrollers

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
3-1 EE 319K Introduction to Microcontrollers Lecture 3: Addressing modes, Memory  Operations, Subroutines, I/O,  Logical/Shift Operations
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3-2 Ramesh Yerraballi ldaa
Background image of page 2
3-3 Ramesh Yerraballi Simple Addressing Modes Clarifications: Immediate mode can use more than 8-bit values: ldd #W;RegD=W load a 16-bit constant into RegD lds #W ;SP=W load a 16-bit constant into SP Branch uses a 8-bit offset however there is a long Branch  instruction that can increase this to 16-bits o bra, bmi, bne, bpl use 8-bit offset:            bra rel8 20 rr        o lbra, lbmi, lbne, lbpl, and 16 other long branch instructions use  16-bit offset:            lbra rel16 18 20 qq rr    o Jmp uses 16-bit destination address in extended addr mode:           jmp opr16 06 hh ll
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3-4 Ramesh Yerraballi Memory to memory move Note that the “addressing mode” applies to the  operands. If an instruction has two operands each has  its own addressing mode: movb #w,addr ; [addr]=w                   Move an 8-bit constant into memory movb addr1,addr2 ; [addr2]=[addr1]    Move an 8-bit value memory to memory movw #W,addr ;{addr}=W             Move a 16-bit constant into memory movw addr1,addr2 ;{addr2}={addr1}    Move a 16-bit value memory to memory EXT-IMM EXT-EXT EXT-IMM EXT-EXT
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/18/2011 for the course EE 319K taught by Professor Bard during the Spring '08 term at University of Texas at Austin.

Page1 / 15

319K_Lec3 - EE319K IntroductiontoMicrocontrollers

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online