Microprocessor proJect, Study Guides, Projects, Research of Electrical Engineering

Handling of Microprcessor kit

Typology: Study Guides, Projects, Research

2017/2018

Uploaded on 12/10/2018

deepthins
deepthins 🇮🇳

8 documents

1 / 27

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
MICROPROCESSOR
LAB MANUAL
NEE-553
DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING
27, Knowledge Park-III, Greater Noida, (U.P.)
Phone : 0120-2323854-58
website :- www.dronacharya.info
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b

Partial preview of the text

Download Microprocessor proJect and more Study Guides, Projects, Research Electrical Engineering in PDF only on Docsity!

MICROPROCESSOR

LAB MANUAL

NEE-

DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING

27, Knowledge Park-III, Greater Noida, (U.P.) Phone : 0120-2323854- website :- www.dronacharya.info

CONTENTS

    1. Syllabus for NEE-553 Lab……………………………….
    1. Study and Evaluation Scheme……………………………
    1. Index……………………………………………………...
    1. Experiment No. 1…………………………………………
    1. Experiment No. 2………………………………………..
    1. Experiment No. 3………………………………………...
    1. Experiment No. 4………………………………………...
    1. Experiment No. 5…………………………………………
    1. Experiment No. 6……………………………………........
    1. Experiment No. 7…………………………………………
    1. Experiment No. 8…………………………………………

STUDY AND EVALUATION SCHEME

SESSIONAL EVALUATION:-

CLASS TEST : 10 MARKS

TEACHER’S ASSESMENT : 10 MARKS

EXTERNAL EXAM : 30 MARKS

TOTAL : 50 MARKS

INDEX

S.NO. NAME OF EXPERIMENT

DATE OF

EVALUATION

GRADE

PROGRAM:-

LXI H, 2009 ; Point 1st^ no. MOV A, M ; Load the acc. INX H ; Adv Pointer ADD M ; ADD 2nd^ NO. INX H ; Adv Pointer MOV M, A ; Store Result RST 5

Decimal Addition:

Steps: 1. Initialize HL Reg. pair with address where the first number is lying.

  1. Store the number in accumulator.
  2. Get the second number.
  3. Add the two numbers and store the result in 200B.
  4. Go back to Monitor

FLOWCHART:-

Get the 1 st no.

Get the 2

nd no.

Add two no.

Store the result

Start

End

Adjust the decimal

PROGRAM:-

LXI H, 2009 ; Point 1st^ no. MOV A, M ; Load the acc. INX H ; Adv Pointer ADD M ; ADD 2nd^ NO. DAA ; Adjust the decimal INX H ; Adv Pointer MOV M, A ; Store Result RST 5

REULTS:-

Thus the numbers at 2009H and at memory are added.

CONCLUSION:-

Thus the program to add two 8-bit numbers was executed.

PRECAUTION:-

Decimal Subtraction :

Steps:-

  1. Initialize HL Reg. pair with address where the first number is lying.
  2. Store the number in accumulator.
  3. Get the second number.
  4. Subtract second no from acc and store the result in 200B.
  5. Adjust the decimal
  6. Go back to Monitor

FLOWCHART:-

Get the 1

st no.

PROGRAM:-

LXI H, 2009 ; Point 1st^ no. MOV A, M ; Load the acc. INX H ; Adv Pointer SUB M ; Subtract IIND NO. DAA ; Adjust the decimal INX H ; Adv Pointer MOV M, A ; Store Result RST 5

REULTS:-

Numbers at 2009H and in HL pairs (Memory) are subtracted

CONCLUSION:-

Thus the subtraction operation is taken out using assembly language.

Get the 2

nd no.

Sub two no.

Store the result

Start

End

Adjust the decimal

PRECAUTION:-

PRE EXPERIMENT QUESTION BANK:-

Q.1. Study how to operate the microprocessor in single stepping. It is very useful in debugging. Q.2. Identify the clock crystal and record its frequency. Calculate the time for opcode fetch. Q.3. Identify 8255 programmable peripheral enter face. Find out the address of parts from manual. Q.4. Identify the ROM & RAM and show in the memory map.

POST EXPERIMENT QUESTION BANK:-

Q.1.Write a small program to enter a data to accumulator and move it to all registers. Q.2. Find out how to read the contents of registers and flags. Read the content of PC, SP. Q.3. Why DAA instruction is to be written just after ADD instruction. Q.4. In above program why MOV A,M instruction is used if direct instruction LDA, address is available.

Steps:-

  1. Initialize HL Reg. pair with address where the first number is lying.
  2. Store the number in accumulator.
  3. Get the second number.
  4. Subtract second no from acc and store the result in 200B.
  5. Adjust the decimal
  6. Go back to Monitor

FLOWCHART:-

Get the 1 st no.

PROGRAM:-

LXI H, 2009 ; Point 1st^ no. MOV A, M ; Load the acc. INX H ; Adv Pointer SUB M ; Subtract IIND NO. DAA ; Adjust the decimal INX H ; Adv Pointer MOV M, A ; Store Result RST 5

REULTS:-

The BCD numbers at 2009H and memory are added or substracted.

CONCLUSION:-

Thus the substracttion operation is taken out using assembly language.

Get the 2

nd no.

Sub two no.

Store the result

Start

End

Adjust the decimal

PRE EXPERIMENT QUESTION BANK:-
  1. Explain the following instructions with addressing modes & no of byte. (a). LHLD 8050 (b). XTHL (c). DADH.
  2. What is the necessity to have two status lines S 1 & S 0 in 8085?

POST EXPERIMENT QUESTION BANK:-

  1. Write a program to exchange the contents of memory location 1000H and 2000H.
  2. Why AD 0 – AD 7 lines are multiplexed?
  3. Give the difference between machine language, assembly language and high level language.
PROGRAM:

MVI D, 00 ; Initialize register D to 00 MVI A, 00 ; Initialize Accumulator content to 00 LXI H, 4150 ; HL Points 4150 MOV B, M ; Get the first number in B - register INX H ; HL Points 4151 MOV C, M ; Get the second number in C- reg. LOOP : ADD B ; Add content of A - reg to register B. JNC NEXT ; Jump on no carry to NEXT. INR D ; Increment content of register D NEXT : DCR C ; Decrement content of register C. JNZ LOOP ; Jump on no zero to address STA 4152 ; Store the result in Memory MOV A, D ; Get the carry in Accumulator STA 4153 ; Store the MSB of result in Memory HLT ; Terminate the program.

REULTS:-

Input: FF (4150) FF (4151) Output: 01 (4152) FE (4153)

CONCLUSION:-

Thus the multiplication process is taken out using assembly language for 8085 microprocessor

EXPRIMENT NO. – 3 (b)

OBJECTIVE: - Write a program to perform multiplication of two 8 bit numbers using bit rotation method

APPARATUS REQUIRED: -

Sr. no. Name of equipments/components/software

Specification/range/rating/versi on

Quantity

1 8085 Microprocessor programming kit, instruction coding sheet.

SCIENTECH-8085 1
  1. Power supply A.C (230V Mains)

DESCRIPTION/ALGORITHM:-

1 ) Start the program by loading HL register pair with address of memory location.

  1. Move the data to a register (E register).
  2. Get the second data and load into Accumulator.
  3. Add the two register contents.
  4. Check for carry.
  5. Increment the value of carry.
  6. Check whether repeated addition is over and store the value of product and carry in memory location.
  7. Terminate the program.

EXAMPLE :

Steps Product Multiplier Comments

B 7 B 6 B 5 B 4 B 3 B 2 B 1 B 0 CY B 3 B 2 B 1 B 0

0 0 0 0 0 0 0 0 0 0 1 0 1 Initial Stage Step 1 0 0 0 0 0 0 0 0 0 1 0 1 0 Shift left by 1 0 0 0 0 0 0 0 0 0 1 0 1 0 Don’t add since CY= 0 Step 2 0 0 0 0 0 0 0 0 1 0 1 0 0 Shift 0 0 0 0 1 1 0 0 1 0 1 0 0 Add multiplicand;CY= Step 3 0 0 0 1 1 0 0 0 0 1 0 0 0 Shift left by 1 0 0 0 1 1 0 0 0 0 1 0 0 0 Don’t add since CY= 0 Step 4 0 0 1 1 0 0 0 0 1 0 0 0 0 Add multiplicand;CY=

PROGRAM:

LXI H, 2200 H ; Initialize the memory pointer MOV E , M ; Get multiplicand MVI D, 00 H ; Extend to 16 bits INX H ; Increment memory pointer MOV A , M ; Get Multiplier LXI H , 0000 H ; Product = 0 MVI B, 08 H ; Initialize counter with count 8 LOOP: DAD H ; Product = product X 2

EXPRIMENT NO. – 4 (a)

OBJECTIVE: - Write a program to perform division of two 8 bit numbers using Repeated Subtraction method.

APPARATUS REQUIRED: - Sr. no. Name of equipments/components/software Specification/range/rating/version Quantity 1 8085 Microprocessor programming kit, instruction coding sheet.

SCIENTECH-8085 1
  1. Power supply A.C (230V Mains)

DESCRIPTION/ALGORITHM:-

  1. Start the program by loading HL register pair with address of memory location.

  2. Move the data to a register (B register).

  3. Get the second data and load into Accumulator.

  4. Compare the two numbers to check for carry.

  5. Subtract the two numbers.

  6. Increment the value of carry.

  7. Check whether repeated subtraction is over and store the value of product and

Carry in memory location.

  1. Terminate the program.
PROGRAM:
LXI H, 4150

MOV B , M ; Get the dividend in B – reg. MVI C, 00 ; Clear C – reg for qoutient INX H ; MOV A , M ; Get the divisor in A – reg. NEXT: CMP B ; Compare A - reg with register B. JC LOOP ; Jump on carry to LOOP SUB B ; Subtract A – reg from B- reg. INR C ; Increment content of register C. JMP NEXT ; Jump to NEXT LOOP: STA 4152 ; Store the remainder in Memory MOV A, C ; STA 4153 ; Store the quotient in memory HLT ; Terminate the program.

RESULTS:

Input: FF (4150) FF (4251) Output: 01 (4152) ---- Remainder FE (4153) ---- Quotient

EXPERIMENT NO.- 4 (b)

OBJECTIVE: - Write a program to perform division of two 8 bit numbers using bit rotation method.

APPARATUS REQUIRED: -

Sr. no. Name of equipments/components/software Specification/range/rating/version Quantity 1 8085 Microprocessor programming kit, instruction coding sheet.

SCIENTECH-8085 1
  1. Power supply A.C (230V Mains)

PROGRAM:

MVI E, 00 H ; Quotient = 0 LHLD 2200 H ; Get Dividend LDA 2300 H ; Get Divisor MOV B , A ; Store Divisor MVI C , 08 H ; Count = 08 NEXT : DAD H ; Dividend = Dividend X 2 MOV A , E RLC MOV E , A ; Quotient = X 2 MOV A , H SUB B ; Is MSB of dividend > divisor JC SKIP ; No go to next step MOV H , A ; Yes subtract divisor INR E ; Quotient = Quotient + 1 SKIP : DCR C ; Count = count – 1 JNZ NEXT ; Is count = 0 repeat MOV A , E STA 2401 H ; Store Quotient MOV A , H STA 2401 H ; Store Remainder HLT ; End of program

REULTS:-

Number at 220H is divided from the number at 2300H

CONCLUSION:-

Thus the division process is taken out in 8085 microprocessor