ET2640 Microprocessors

Similar documents
ENE 334 Microprocessors

Principle and Interface Techniques of Microcontroller

8051 Addressing Modes

EE6502- MICROPROCESSOR AND MICROCONTROLLER

ET2640 Microprocessors

Figure Programming model

UNIT-III ASSEMBLY LANGUAGE PROGRAMMING. The CPU can access data in various ways, which are called addressing modes

ET355 Microprocessors Friday 6:00 pm 10:20 pm

The 8051 Microcontroller and Embedded Systems

MICROCONTROLLER UNIT 1

8051 Microcontroller

MICROCONTROLLER AND PLC LAB-436 SEMESTER-5

8051 Overview and Instruction Set

Microcontroller Intel [Instruction Set]

Embedded Controller Programming

Errata Sheet. May 6, 1996 / Release 1.3. Marking :

Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples.

Assembly Language programming (2)

APPNOTE034. Dragonchip. System migration from DC6688FL32A/B to DC6688FLE / FLX. Document Revision 1.6 November, APPNOTE034 Rev1.6.

CPEG300 Embedded System Design. Lecture 3 Memory

8051 Microcontrollers

Question Bank Microprocessor and Microcontroller

Assembly Language programming (1)

Q. Classify the instruction set of 8051 and list out the instructions in each type.

8051 Instruction Set


UNIT 2 THE 8051 INSTRUCTION SET AND PROGRAMMING

MODULE-1. Short Answer Questions

8051 Microcontroller Logical Operations. Prepared by : A. B. Modi Target Audience : 5 th Semester Students

Microprocessors 1. The 8051 Instruction Set. Microprocessors 1 1. Msc. Ivan A. Escobar Broitman

Embedded World Television, Radio, CD player, Washing Machine Microwave Oven Card readers, Palm devices

Lecture 5. EEE3410 Microcontroller Applications Department of Electrical Engineering Assembly Language Programming (1)

Module Contents of the Module Hours COs

Dodatak. Skup instrukcija

DR bit RISC Microcontroller. Instructions set details ver 3.10

8051 Microcontroller. Ali Ziya Alkar 1

8051 Addressing Mode and Instruction Set

Programming of 8085 microprocessor and 8051 micro controller Study material

8051 microcontrollers

The Microcontroller. Lecture Set 3. Major Microcontroller Families. Example Microcontroller Families Cont. Example Microcontroller Families

MICROPROCESSORS AND MICROCONTROLLERS MATERIAL. Features of 8051:

Introduction to uc & Embedded Systems

_ V Intel 8051 Family In-Circuit Emulation. Contents. Technical Notes

Chapter Addressing Modes

MODEL ANSWER SUBJECT- MICROCONTROLLER(12187) CLASS-EJ5E CLASS TEST-02 Q1.)Attempt any THREE of the following.

80C451 operation of port 6

ET2640. Unit 5:ADVANCED I/O TECHNIQUES Pearson Education, Inc. Pearson Prentice Hall Upper Saddle River, NJ 07458

1. Write A Program to move a block of data within the internal RAM

80C51 Block Diagram. CSE Overview 1

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

8051 Microcontroller Assembly Programming

8051 Microcontrollers

8-bit Microcontroller with 8K Bytes In-System Programmable Flash AT89S52

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 4 The 8051 Architecture

AE66/AC66/AT66/ AE108/AC108/AT108 MICROPROCESSORS & MICROCONTROLLERS

MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microcontroller Subject Code:

LAB FILE of EE1531: MICROCONTROLLER & EMBEDDED SYSTEMS LAB

UNIT THE 8051 INSTRUCTION SET AND PROGRAMMING

Byte order, special function registers

8051 Core Specification

ELEG3923 Microprocessor Ch.4 I/O Ports

Programming Book Microcontroller Kit. Rev 3.0 January, Wichit Sirichote

Application Brief D-005

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) SUMMER 14 EXAMINATION Model Answer

Instruction Set Of 8051

Backing Up Firmware from Dallas Semiconductor DS5002FP

Principle and Interface Techniques of Microcontroller

8051 INTERFACING TO EXTERNAL MEMORY

INTEGRATED CIRCUITS. AN408 80C451 operation of port 6

Designing a Embedded Controllers Course Utilizing a Low Cost 8051 Micro-Controller Board

Contents. Join the Technical Community Today!

8051 Microcontroller

CHAPTER ASSEMBLY LANGUAGE PROGRAMMING

MODEL ANSWER SUMMER 17 EXAMINATION Subject Title: Microcontroller and Applications Subject Code:

8051 Programming using Assembly

SN8F5000 Family Instruction Set

Principle and Interface Techniques of Microcontroller

ENE 334 Microprocessors

Microcontroller. Instruction set of 8051

Legacy documentation refer to the Altium Wiki for current information. TSK52x MCU

80C51 family programmer s guide and instruction set. 80C51 Family. PROGRAMMER S GUIDE AND INSTRUCTION SET Memory Organization. Philips Semiconductors

Fig 1. Block diagram of a microcomputer

Chapter 9. Programming Framework

AT89S4D12. 8-Bit Microcontroller with 132K Bytes Flash Data Memory AT89S4D12. Features. Description. Pin Configurations

8051 MICROCONTROLLER

UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller.

FACULTY OF ENGINEERING LAB SHEET

SOLUTION MANUAL FOR THE 8051 MICROCONTROLLER 4TH EDITION BY MACKENZIE AND PHAN

The Final Word on 8051 Microcontroller

CHAPTER 4 I/O PORT PROGRAMMING

PC BOARD DESIGN FOR Akhil Guliani

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT- IV

Module I. Microcontroller can be classified on the basis of their bits processed like 8bit MC, 16bit MC.

Memory Organization. Program Memory

Vidyalankar T.E. Sem. V [ETRX] Microprocessors and Microcontrollers I Prelim Question Paper Solution

8051 I/O and Class 6 EE4380 Spring 03. Pari vallal Kannan. Center for Integrated Circuits and Systems University of Texas at Dallas

SUMMER 13 EXAMINATION

TUTORIAL. Donal Heffernan University of Limerick May Tutorial D.Heffernan 2000,

S.J.P.N Trust's. Hirasugar Institute of Technology, Nidasoshi.

Transcription:

ET2640 Microprocessors Unit -3 I/O Operations & Addressing mode Instructor : Stan Kong Email : skong@itt-tech.edu

Figure 4 1 8051 Pin Diagram

Figure 4 2 Port 0 with Pull-Up Resistors

Table 4 1 Port 3 Alternate Functions

Table 4 2 Reset Value of Some 8051 Ports

Table 4 3 Single-Bit Addressability of Ports

Table 4 4 Single-Bit Instructions

Table 4 5 Instructions For Reading an Input Port

Table 4 6 Instructions Reading a Latch (Read-Modify-Write)

Figure 5 1 16 Bytes of Internal RAM. Note: They are both bit- and byte-accessible.

Figure 5 2 SFR RAM Address (Byte and Bit)

Figure 5 3 Bits of the PSW Register

Figure 5 4 8052 On-Chip RAM Address Space

Figure 5 5. Franklin Software s ProView Upper Memory for the 8052

Figure 5 6. Keil s Vision Upper Memory for the 8052

Table 5 1 8051 Special Function Register (SFR) Addresses

Table 5 2 Single-Bit Instructions

Table 5 3 Bit Addresses for All Ports

Addressing Mode An "addressing mode" refers to how you are addressing a given memory location. In summary, the addressing modes are as follows, with an example of each: Immediate Addressing - MOV A,#20h Direct Addressing - MOV A,30h Indirect Addressing - MOV A,@R0 External Direct - MOVX A,@DPTR Code Indirect - MOVC A,@A+DPTR

Immediate Addressing Immediate addressing is so-named because the value to be stored in memory immediately follows the operation code in memory. That is to say, the instruction itself dictates what value will be stored in memory. For example, the instruction: MOV A,#20h This instruction uses Immediate Addressing because the Accumulator will be loaded with the value that immediately follows; in this case 20 (hexidecimal).

Direct Addressing Direct addressing is so-named because the value to be stored in memory is obtained by directly retrieving it from another memory location. For example: MOV A,30h This instruction will read the data out of Internal RAM address 30 (hexidecimal) and store it in the Accumulator. Direct addressing is generally fast since, although the value to be loaded isn t included in the instruction, it is quickly accessable since it is stored in the 8051s Internal RAM. It is also much more flexible than Immediate Addressing since the value to be loaded is whatever is found at the given address--which may be variable.

Indirect Addressing Indirect addressing is a very powerful addressing mode which in many cases provides an exceptional level of flexibility. Indirect addressing is also the only way to access the extra 128 bytes of Internal RAM found on an 8052. Indirect addressing appears as follows: MOV A,@R0 This instruction causes the 8051 to analyze the value of the R0 register. The 8051 will then load the accumulator with the value from Internal RAM which is found at the address indicated by R0.

External Indirect External Memory is accessed using a suite of instructions which use what I call "External Direct" addressing. I call it this because it appears to be direct addressing, but it is used to access external memory rather than internal memory. There are only two commands that use External Direct addressing mode: MOVX A,@DPTR MOVX @DPTR,A As you can see, both commands utilize DPTR. In these instructions, DPTR must first be loaded with the address of external memory that you wish to read or write. Once DPTR holds the correct external memory address, the first command will move the contents of that external memory address into the Accumulator. The second command will do the opposite: it will allow you to write the value of the Accumulator to the external memory address pointed to by DPTR.

External Indirect External memory can also be accessed using a form of indirect addressing which I call External Indirect addressing. This form of addressing is usually only used in relatively small projects that have a very small amount of external RAM. An example of this addressing mode is: MOVX @R0,A Once again, the value of R0 is first read and the value of the Accumulator is written to that address in External RAM. Since the value of @R0 can only be 00h through FFh the project would effectively be limited to 256 bytes of External RAM. There are relatively simple hardware/software tricks that can be implemented to access more than 256 bytes of memory using External Indirect addressing; however, it is usually easier to use External Direct addressing if your project has more than 256 bytes of External RAM.

ET2640 i d

ET2640 i d

ET2640 i d

ET2640 i d