EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER

Similar documents
Assembly Language Programming of 8085

Assembly Language Programming of 8085

Introduction to Assembly Language Programming (Instruction Set) 1/18/2011 1

(2) Explain the addressing mode of OR What do you mean by addressing mode? Explain diff. addressing mode for 8085 with examples.

Practical Course File For


LIST OF PROGRAMS. Prg. Name of the Program. 1 Study of Pin Diagram of Study of Architecture of Study of 8085 Kit.

8085 INSTRUCTION SET INSTRUCTION DETAILS

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly.

INSTRUCTION SET OF 8085

Its Assembly language programming

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT I THE 8085 & 8086 MICROPROCESSORS. PART A (2 Marks)

1. Internal Architecture of 8085 Microprocessor

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

م.م. ماجد عيدان. Introduction to microprocessor and microcomputer

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

UNIT I. Differences between: Microcomputer, Microprocessor and Microcontroller

Lecture-12 INTERNAL ARCHITECTURE OF INTEL 8085: The Functional Block Diagram Of 8085 Is Shown In Fig 16.

MICROPROCESSOR BASICS AND RELATED TERMS

CHAPTER ASSEMBLY LANGUAGE PROGRAMMING

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

1. Internal Architecture of 8085 Microprocessor

1. What is Microprocessor? Give the power supply & clock frequency of 8085?

Basics of Microprocessor

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

1. Internal Architecture of 8085 Microprocessor

ELECTRICAL ENGINEERING

History and Basic Processor Architecture

Microprocessor Architecture

Subject Code: Model Answer Page No: /25

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

Chapter 3. Z80 Instructions & Assembly Language. Von Neumann Architecture. Memory. instructions. program. data

The functional block diagram of 8085A is shown in fig.4.1.

INDEX. 1 Study of intel 8085 micropeocessor kit. 2 Program to find addition of two 8 bit no. 3 Program to find subtraction of two 8 bit no.

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

Computer Organization

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

XII HSC - BOARD - MARCH

EKT222 Miroprocessor Systems Lab 5

S.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING

E3940 Microprocessor Systems Laboratory. Introduction to the Z80

8/26/2010. Introduction to 8085 BLOCK DIAGRAM OF INTEL Introduction to Introduction to Three Units of 8085

12-Dec-11. Gursharan Singh Maninder Kaur. Introduction to 8085 BLOCK DIAGRAM OF INTEL Introduction to Introduction to 8085

MSMF GATE CENTRE. Sub: MICROPROCESSORS. Time: 50min Date: Marks:33

Unit 1 8 BIT MICROPROCESSOR ARCHITECTURE

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

8051 Microcontrollers

Sunday, April 25, 2010

MICROPROCESSOR MICROPROCESSOR. From the above description, we can draw the following block diagram to represent a microprocessor based system: Output

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

SAMPLE STUDY MATERIAL

ET2640 Microprocessors

ROEVER ENGINEERING COLLEGE

QUESTION BANK. EE 6502 / Microprocessor and Microcontroller. Unit I Processor. PART-A (2-Marks)

Microcomputer Architecture and Programming

COPYRIGHT IS NOT RESERVED BY AUTHORS. AUTHORS ARE NOT RESPONSIBLE FOR ANY LEGAL ISSUES ARISING OUT OF ANY COPYRIGHT DEMANDS

GATE Exercises on Microprocessors

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

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS

Chapter 1: Basics of Microprocessor [08 M]

Q. P. Code : b. Draw and explain the block dig of a computer with microprocessor as CPU.

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.

8051 Microcontroller

Lecture Note On Microprocessor and Microcontroller Theory and Applications

Instruction set of 8085

8051 Overview and Instruction Set

9/25/ Software & Hardware Architecture

Lecture 2 Microcomputer Organization: Fig.1.1 Basic Components of Microcomputer

Micro Processor & Micro Controllers

Architecture of 8085 microprocessor

Assembly language Programming

Figure Programming model

3.1 Description of Microprocessor. 3.2 History of Microprocessor

b. List different system buses of 8085 microprocessor and give function of each bus. (8) Answer:

Microcontroller Intel [Instruction Set]

ELEG3923 Microprocessor Ch.2 Assembly Language Programming

ELEG3924 Microprocessor


4 Categories Of 8085 Instructions That Manipulate Data

1. What is microprocessor? It is a program controlled semi conductor device (IC), which fetches, decodes and execute instructions.

1-Operand instruction types 1 INC/ DEC/ NOT/NEG R/M. 2 PUSH/ POP R16/M16/SR/F 2 x ( ) = 74 opcodes 3 MUL/ IMUL/ DIV/ DIV R/M

The Itanium Bit Microprocessor Report

Chapter. Computer Architecture

INSTITUTE OF ENGINEERING AND MANAGEMENT, KOLKATA Microprocessor

Computer Architecture 2/26/01 Lecture #

Chapter 5. Computer Architecture Organization and Design. Computer System Architecture Database Lab, SANGJI University

PERIPHERAL INTERFACING Rev. 1.0

G. Pullaiah College of Engineering and Technology: Kurnool Department Of Electronics and Communication Engineering

Digital IP Cell 8-bit Microcontroller PE80

MICROPROCESSOR B.Tech. th ECE

CPU Design John D. Carpinelli, All Rights Reserved 1

Microprocessor, Microcomputer and Associated Languages

COA. Prepared By: Dhaval R. Patel Page 1. Q.1 Define MBR.

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY COMMUNICATION ENGINEERING REG 2008 TWO MARKS QUESTION AND ANSWERS

Programming of 8085 microprocessor and 8051 micro controller Study material

Computer System Architecture

Introduction to Microprocessor

Transcription:

OBJECT: EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER To understand the structure and operating instruction of the microprocessor trainer. INTRODUCTION: The MKT 8085 is a single-board microcomputer, is built around the Intel 8085 microprocessor, primarily for training purposes. The block diagram of the trainer system is shown in Figure (1).It includes: 1- The 8085 microprocessor. 2-The 8755 (or 8355) as EPROM (2K) where the system monitor program is stored permanently. The microcomputer can read from the ROM, but can not write to it. The data bits stored in a ROM are maintained, even when a power is connected to the device. 3-The 8155 (This chip has 256 bytes of R/W memory (Random Access memory RAM). The memory map of the 8155 ranges from 2000h to 20FFh however, the memory locations from 20c2h to 20ffh are reserved for the use of the monitor or some other functions. In this memory, the user can enter a program and execute it using the keyboard). The microcomputer can read from the RAM and write to it. Ram will lose its data when power is removed. The RAM available for storage of user programs and data is restricted between address (2000h) and (20C1h). The memory map of the trainer is shown in Figure (2). 4-The keypad: Hex keyboard enables the user to enter and store the 8085 hex machine code representing the 8085 assembly language programs in R/W memory. A program can be executed using the function keys on the keyboard. The result can be displayed by the LEDs. 5-Six seven-segment LEDs for display. The keyboard and the display are interfaced with the 8085 through the keyboard/ display controller the 8279. 6-The trainer is interfaced to the outside world through additional input/output (I/O) ports. The monitor program contains all necessary subroutines for the operation of the keypad and display, as well as some other useful functions. 1

THE 8085 MICROPROCESSOR: The 8085 represents the first generation of microprocessor chips. It is an 8 bit micro with 8 bit data bus, 16 bit address bus and a 6 bit control bus. The data bus is used for the transfer of information between the micro chip and the rest of the system. The address bus is used for addressing the required place of memory. Since the address bus is a 16 bit, then the maximum size of memory is (2) 16 =64K byte of memory. The control bus is composed of six signals to control the (Read/Write) of memory and (I/O) selection. Internally the 8085 chip contain 8 bit accumulator, used as part of all arithmetic and logic operations performed by the microprocessor. The flag is an 8 bit register, but utilizing only five of the bits namely: zero, sign, carry, parity, and auxiliary carry. Also the 8085 contain six another 8 bit general purpose register, namely: B, C, D, E, H and L. General purpose registers can be combined as register pairs BC, DE, and HL to perform some 16-bit operations. For register pair BC, register C can be determined as the low register and register B as the high. So that registers (D and E) and registers (H and L). The Program Counter (PC) is 16 bit register used to point the location of the next program step to be executed. The Stack Pointer (SP) is also a 16 bit register used to point the location of the stack area in memory. The Processor Status Word (PSW), is another 16 bit register which comprises the accumulator and the flag register (PSW: high byte=a, Low byte=flag register). 2

8-bit internal data bus Instruction register (8) Temporary register (8) A register (8) (accumulator) B register (8) D register (8) H register (8) C register (8) E register (8) L register (8) Control Unit Arithmetic and logic unit (ALU) (8) Stack Pointer Program Counter Increment decrement address latch (16) Status Flag Address Buffer (8) Data/Address Buffer (8) In Out Control bus A15-A8 Address Bus AD7-AD0 Address / Data Bus Figure (1) The Intel 8085 CPU 3

The ROM and RAM areas in 8085 trainer kit are addressed as follows: Memory Area Monitor ROM User RAM Expansion RAM Buffered Expansion Space Address Range 0000H 07FFH 2000H 20C1H 2800H - 28FFH 8000H - FFFFH Figure (2) Memory map of the MKT 8085 microprocessor Trainer 4

The flag register is affected by the result of arithmetic and logical operations only. The structure of flag register is as follow: S (Sign flag): This bit is set (logic 1) if the most significant bit of the result of an operation is 1 otherwise it is reset (logic 0). Z (Zero flag): This bit is set if the content of the accumulator after an operation is zero, otherwise it is reset. CY (Carry flag): This bit is set if an operation causes carry or borrow out of the most significant bit of the accumulator. AC (Auxiliary Carry): This bit is set if there is a carry between the fourth and fifth bits of the accumulator. P (Parity flag): This bit is set if the number of ones in the accumulator is even, otherwise it is reset. S Z X AC X P X CY Bit 7 Bit 0 X : Don t care Flag register diagram 5

THE 8085 INSTRUCTION SET The 8085 instruction set includes five different types of instructions. 1. Data Transfer Group: Move data between registers or between memory and register. 2. Arithmetic Group: Add, subtract increment or decrement data in registers or memory. 3. Logical Group: AND, OR, EXCLUSIVE-OR, compare, rotate or complement data in registers or in memory. 4. Branch Group: Conditional and unconditional jump instructions, subroutine call instructions and return instructions. 5. Stack, I/O, and Machine Control Group: Includes I/O instructions, as well as instructions for maintaining the stack and internal control flags. Note: only Arithmetic and logical instructions affected the flag register. The 8085 can operate either on the internal CPU registers (A, B, C, D, E, H, & L) or in the system memory (RAM or ROM). The different addressing capabilities on the 8085 are: a. Implied: Meaning that the operation involves an operation on one of the registers. (E.g. ADD B, INR C). b. Immediate: Which involves an operation with a type supplied immediately after the instruction. (E.g. ADI 03, ORI 02). c. Direct: Which involves an operation with data sound on the address supplied as two bytes after the instruction. (e.g. LDA 2050, STA 2051). 6

ASSEMBLY LANGUAGE PROGRAM Examples of instructions: No Instruction Type No. of Function Effect Bytes on flags 1. MVI rd,byte Data transfer 2 rd=byte None 2. MOV rd,rs Data transfer 1 rd=rs None 3. INR r arithmetic 1 r=r+1 All but CY 4. DCR r arithmetic 1 r=r-1 All but CY 5. HLT Machine Control 1 Stop processing None 6. RST1 Restart 1 Pc=0008 None r: register (8-bit) rd: destination register (8-bit) rs: source register (8-bit) Assembly language programs are written in a standard format as follows: Address Hexcode Label Opcode Operand Comment 2000 2001 2002 2003 3E 03 3C CF START: MVI INR RST1 A, 03 A ; A=3 ; A=A+1=4 ; S=0, Z=0, Ac=0, P=0 ; End The address field specifies the address of the respective instruction. The hexcode field lists the data after translation of the source code of machine language program. This field contains the data to be entered to the machine. The label field specifies the label for the program. Opcode field specifies the 8085 instructions to be executed. Operand field specifies the data to be operated by the corresponding instruction. Comment field is an optional field used to comment lines. 7

THE MKT 8085 TRAINER COMMANDS I. Memory Modification and Program Entry: Reset key is used to reset the system. Subst Mem key is used to locate memory location to examine or modify its contents. Next key is used to store the display data byte in memory and go to the next memory location and display its contents. EXEC key is used to start execution or to terminate program entry. SUBST MEM Address Data Data NEXT NEXT NEXT Data EXEC 1 2 n e.g. Suppose we want to enter the following values in the computer: 2000 3E 03 MVI A, 3 2002 3C INR A 2003 CF RST1 Then the following steps are to be performed: 1. Press SUBST MEM 2. Press 2000 NEXT 3. Press 3E NEXT 4. Press 03 NEXT 5. Press 3C NEXT 6. Press CF NEXT 7. Press EXEC In order to check the entries of the program, we do the following steps: 1. Press SUBST MEM 2. Press 2000 NEXT 3. Press NEXT 4. Press NEXT 5. Press NEXT 6. Press EXEC 8

II. Register Display and Modification: Exam Reg key is used to display the contents of registers. EXAM REG < REG> Data Data NEXT NEXT NEXT Data EXEC e.g. To display the contents of the register, do the following steps: 1. Press EXAM REG. 2. Press A and NEXT, the contents of the acc. Is displayed. 3. Press NEXT, the contents of the register B is displayed. 4. Press NEXT, the contents of the register C is displayed. Continuing in the same way, the contents of the registers D, E, F (flags), I (Interrupt mask), H, L, SPH, SPL, PCH and PCL will be displayed. Note:- If you need to examine the register contents, terminates the program with the instruction RST1 (machine code CF) instead of HLT (machine code 76). The RST instruction stops the user's program and returns control of the computer to the monitor program. III. Run and Single Step Modes: SINGLE STEP key is used to execute the program, one instruction at a time. To execute a program in a single step mode, do the following: SINGLE STEP Address NEXT NEXT EXEC e.g. To execute a program at address 2000. Do the following: 1. Press SINGLE STEP 2. Press 2000 NEXT 3. Press NEXT 4. Press NEXT 5. Press EXEC To run the program at address 2000, we use: GO Address EXEC 9

GO key is used to locate memory location to start execution. To execute program at address 2000, do the following: 1. Press GO 2. Press 2000 EXEC Lab work Q1) 1. Shown below is a coding of a sample assembly program: Address Hexcode Label Opcode Operand Comments 2000 2001 2002 2003 2004 2005 3E 05 3D 3D 3D CF START: MVI DCR DCR DCR RST1 A, 05 A A A ; A=5 ; A=A-1=4 ; S=0, Z=0, Ac=0, P=0 ; A=A-1=3 ; S=0, Z=0, Ac=0, P=1 ; A=A-1=2 ; S=0, Z=0, Ac=0, P=0 ; End 2. Enter the above program in the memory. 3. Check the values of the entered program. 4. Run the program using single step command and check the values of the registers. 5. Run the program using direct run mode. Q2) Exchange the content of H and L when H=11h and L=22h Home Work Write programs with effects 1. B=C+1 when C=50h 2. Exchange the content of DE with HL when DE=15ah, HL=8b1ch 10