



















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Handling of Microprcessor kit
Typology: Study Guides, Projects, Research
1 / 27
This page cannot be seen from the preview
Don't miss anything!




















27, Knowledge Park-III, Greater Noida, (U.P.) Phone : 0120-2323854- website :- www.dronacharya.info
STUDY AND EVALUATION SCHEME
INDEX
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.
FLOWCHART:-
Get the 1 st no.
Get the 2
nd no.
Add two no.
Store the result
Start
End
Adjust the decimal
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
Thus the numbers at 2009H and at memory are added.
Thus the program to add two 8-bit numbers was executed.
Steps:-
FLOWCHART:-
Get the 1
st no.
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
Numbers at 2009H and in HL pairs (Memory) are subtracted
Get the 2
nd no.
Sub two no.
Store the result
Start
End
Adjust the decimal
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.
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:-
FLOWCHART:-
Get the 1 st no.
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
The BCD numbers at 2009H and memory are added or substracted.
Get the 2
nd no.
Sub two no.
Store the result
Start
End
Adjust the decimal
POST EXPERIMENT QUESTION BANK:-
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.
Input: FF (4150) FF (4151) Output: 01 (4152) FE (4153)
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.
DESCRIPTION/ALGORITHM:-
1 ) Start the program by loading HL register pair with address of memory location.
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=
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.
DESCRIPTION/ALGORITHM:-
Start the program by loading HL register pair with address of memory location.
Move the data to a register (B register).
Get the second data and load into Accumulator.
Compare the two numbers to check for carry.
Subtract the two numbers.
Increment the value of carry.
Check whether repeated subtraction is over and store the value of product and
Carry in memory location.
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.
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.
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
Number at 220H is divided from the number at 2300H
Thus the division process is taken out in 8085 microprocessor