NATIONAL TAIWAN OCEAN UNIVERSITY 國立台灣海洋大學 2002/4/8 Microcomputers and Microprocessors Chapter 5 Addressing Modes.

Slides:



Advertisements
Similar presentations
Suranaree University Of Technology มทส  2002 Anant Oonsivilai 2002/2/27 Microcomputers and Microprocessors Chapter Assembly Language Programming.
Advertisements

Class Addressing modes
Programming the 8051 Microcontroller Dr. Konstantinos Tatas
Autumn 2012C.-S. Shieh, EC, KUAS, Taiwan1 The 8051 Family Microcontroller Chin-Shiuh Shieh Department of Electronic Engineering.
Chapter Addressing Modes
Suranaree University Of Technology มทส  2002 Anant Oonsivilai 2002/4/8 Microcomputers and Microprocessors 1 Chapter 5 Addressing Modes.
The 8051 Microcontroller and Embedded Systems
There are two types of addressing schemes:
8051 Core Specification.
Msc. Ivan A. Escobar Broitman Microprocessors 1 1 The 8051 Instruction Set.
Lecture 2 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
Addressing Modes Instruction – Op-code – Operand Addressing mode indicates a way of locating data or operands. – Any instruction may belong to one or more.
LS R First Design Key board. A B Second Design A B C D CD B Key board Third Design.
8051 ASSEMBLY LANGUAGE PROGRAMMING
Microcontroller Intel 8051
ADDRESSING MODES OF Addressing Modes of  To perform any operation, we have to give the corresponding instructions to the microprocessor.
Mr. Gursharan Singh Tatla
UNDERSTANDING ASSEMBLY LANGUAGE.
NATIONAL TAIWAN OCEAN UNIVERSITY 國立台灣海洋大學 2002/4/8 Microcomputers and Microprocessors Chapter 9 COUNTER/TIMER PROGRAMMING IN THE 8051.
CoE3DJ4 Digital Systems Design Chapter 3: instruction set summary.
The 8051 Microcontroller and Embedded Systems
University Of Engineering And Technology Taxila REF::NATIONAL TAIWANOCEAN UNIVERSITY 國立台灣海洋大學 Chapter 3 JUMP, LOOP and CALL Instructions.
The 8051 Microcontroller and Embedded Systems
Eng. Husam Alzaq The Islamic Uni. Of Gaza
Lecture Set 4 Programming the 8051.
Parul Polytechnic Institute Subject Code : Name Of Subject : Microprocessor and assembly language programming Name of Unit : Instruction cycle.
Memory Addressing Techniques. Immediate Addressing involves storing data in pairs with immediate values register pairs:
The 8051 Assembly Language. Overview Data transfer instructions Addressing modes Data processing (arithmetic and logic) Program flow instructions.
Microprocessors used in Personal Computers. The Memory Map of a Personal Computers Transient Program Area (TPA): Holds the operating system (interrupt.
Introduction to Microprocessors Chapter 3. Programming Model (8086)  Shows the various internal registers that are accessible to the programmer.
1 EKT 225 MICROCONTROLLER I CHAPTER ASSEMBLY LANGUAGE PROGRAMMING.
8051 Micro Controller. Microcontroller versus general-purpose microprocessor.
Internal Programming Architecture or Model
Addressing Modes Instruction – Op-code – Operand Addressing mode indicates a way of locating data or operands. – Any instruction may belong to one or more.
Type of addressing mode
1 Contents: 3.1 Instruction format and Addressing Modes 3.2 Instruction Introduction Chapter 3 Instruction system.
1.  List all addressing modes of PIC18 uCs  Contrast and compare the addressing modes  Code PIC18 instructions to manipulate a lookup table.  Access.
Microprocessors I 8051 Addressing Modes CS Prof. Msc. Ivan A. Escobar
Design methodology for Implementing a Microcontroller in a FPGA. Phillip Southard Ohio University EE 690 Reconfigurable Design.
Programmable System on Chip
CHAPTER ADDRESSING MODES.
Presentation on Real Mode Memory Addressing
Classification of Instruction Set of 8051
Chapter 11 Instruction Sets
Microprocessor T. Y. B. Sc..
The 8051 Microcontroller and Embedded Systems
8051 Addressing Modes The way, using which the data source or destination addresses are specified in the instruction mnemonic for moving the data, is.
Data Processing Instructions
SCHOOL OF ELECTRONICS ENGINEERING Electronics and Communication
Timer.
Memory organization On- chip memory Off-chip memory
Introduction to Micro Controllers & Embedded System Design Instruction set Department of Electrical & Computer Engineering Missouri University of Science.
The CPU12 Microprocessor Core
8086 Registers Module M14.2 Sections 9.2, 10.1.
Introduction to Micro Controllers & Embedded System Design Addressing Mode Department of Electrical & Computer Engineering Missouri University of Science.
ADDRESSING MODES AND INSTRUCTION SET
Data Transfer Operations
Stack Relative Deferred (sf) Indexed (x) Stack Indexed (sx)
Computer Architecture and the Fetch-Execute Cycle
Introduction to Micro Controllers & Embedded System Design Instruction set Department of Electrical & Computer Engineering Missouri University of Science.
Under Address Modes Source: under
DMT 245 Introduction to Microcontroller
First Design Key board R L S.
Stack Relative Deferred (sf) Indexed (x) Stack Indexed (sx)
UNIT-VIII 8051 Microcontroller Architecture Register set of 8051
Under Address Modes Source: under
8051 ASSEMBLY LANGUAGE PROGRAMMING
Instruction Set Summary
Addressing Modes in 8051 MC S. Lourduraj Asst. Prof. of Physics
Addressing Modes of 8085.
Presentation transcript:

NATIONAL TAIWAN OCEAN UNIVERSITY 國立台灣海洋大學 2002/4/8 Microcomputers and Microprocessors Chapter 5 Addressing Modes

 2002 MuDer Jeng Outlines  Five addressing modes of 8051  Code instructions using each addressing mode  Access RAM using various addressing modes  SFR addresses  Access SFR  Operate stack using direct addressing mode  Code instructions to operate look-up table

 2002 MuDer Jeng Five Addressing Modes  Immediate  Register  Direct  Register indirect  Indexed

 2002 MuDer Jeng Immediate Addressing Mode MOVA,#25H;load 25H into A MOV R4,#62;load the decimal value 62 into R4 MOV B,#40H;load 40H into B MOVDPTR,#4521H;DPTR=4521H MOVDPTR,#2550H ;is the same as: MOVDPL,#50H MOVDPH,#25H

 2002 MuDer Jeng MOVDPTR,#68975;illegal!! value > (FFFFH) COUNT EQU 30 … … MOV R4,#COUNT;R4=1E (30=1EH) MOV DPTR,#MYDATA;DPTR=200H ORG 200H MYDATA: DB “America”

 2002 MuDer Jeng Register Addressing Mode MOVA,R0;copy the contents of R0 into A MOVR2,A;copy the contents of A into R2 ADDA,R5;add the contents of R5 to contents of A ADDA,R7;add the contents of R7 to contents of A MOVR6,A;save accumulator in R6 MOVDPTR,#25F5H MOVR7,DPL MOVR6,DPH

 2002 MuDer Jeng Direct Addressing Mode  RAM addresses 00 to 7FH MOVR0,40H;save content of RAM location 40H in R0 MOV56H,A;save content of A in RAM location 56H MOVR4,7FH;move contents of RAM location 7FH to R4 MOVA,4;is same as MOV A,R4;which means copy R4 into A MOVA,7;is same as MOVA,R7;which means copy R7 into A

 2002 MuDer Jeng MOVA,2;is the same as MOVA,R2;which means copy R2 into A MOVA,0;is the same as MOVA,R0;which means copy R0 into A MOVR2,#5;R2=05 MOVA,2;copy R2 to A (A=R2=05) MOVB,2;copy R2 to B (B=R2=05) MOV7,2;copy R2 to R7 ;since “MOV R7,R2” is invalid

 2002 MuDer Jeng SFR Registers & Their Addresses MOV0E0H,#55H;is the same as MOVA,#55H;which means load 55H into A (A=55H) MOV0F0H,#25H;is the same as MOV B,#25H;which means load 25H into B (B=25H) MOV0E0H,R2;is the same as MOVA,R2;which means copy R2 into A MOV0F0H,R0;is the same as MOVB,R0;which means copy R0 into B

 2002 MuDer Jeng SFR Addresses ( 1 of 2 )

 2002 MuDer Jeng SFR Addresses ( 2 of 2 )

 2002 MuDer Jeng Example

Stack and Direct Addressing Mode  Only direct addressing is allowed for stack

 2002 MuDer Jeng Register Indirect Addressing Mode  Only R0 & R1 can be used contents of RAM location whose ;address is held by R0 into A contents of B into RAM location ;whose address is held by R1

 2002 MuDer Jeng Example ( 1 of 2 )

 2002 MuDer Jeng Example ( 2 of 2 )

 2002 MuDer Jeng Advantage of Register Indirect Addressing  Looping not possible in direct addressing

 2002 MuDer Jeng Example

Index Addressing Mode & On-chip ROM Access  Limitation of register indirect addressing: 8- bit addresses (internal RAM)  DPTR: 16 bits  ; “C” means program (code) space ROM

 2002 MuDer Jeng Example ( 1 of 2 )

 2002 MuDer Jeng Example ( 2 of 2 )

 2002 MuDer Jeng Example ( 1 of 3 )

 2002 MuDer Jeng Example ( 2 of 3 )

 2002 MuDer Jeng Example ( 3 of 3 )

 2002 MuDer Jeng Look-up Table & Indexed Addressing

 2002 MuDer Jeng Example