You are on page 1of 23

EXPERIMENT NO -1(a)

Objective:-Write a program using 8085 Microprocessor for hexadecimal subtraction of two


Numbers.
Apparatus used: 8085 Microprocessor kit, Keyboard and Power supply.

Procedure: The following steps are required to implement the program-


1. Enter the numbers at memory location D000H & D001H.
2. The result is to be stored in the memory location D002H.
3. Numbers are represented in hexadecimal system.

Program Code:-
Machine Label Mnemonics Operand Comments
Memory codes
address
2000 21,00,D0 LXI H,D000H HL points to the memory
location D000 H
2003 7E MOV A,M Get the contents of location
D000 H into the accumulator
2004 23 INX H Increment HL to point to next
Memory location i.e. D001H
2005 96 SUB M A = A – M i.e. compute the
subtraction
2006 23 INX H Increment HL to point to next
memory location i.e. D002H
2007 77 MOV M,A Store the result at memory
location D002 H
2008 76 HLT Terminate the execution of
program

Data:-
D000H =50H 50H
D001H=20H - 20H
_______
Result: D002H= 30H
Store the result at memory location D002 H.
Conclusion: The result of subtraction of two hexadecimal numbers is verified.
Precautions:
1. Do not press any wrong key of the keyboard.
2. Feed the correct program.
3. Press desired key only.
4. Power supply Switched Off after completing the Experiment.
5: Do not touch any IC of the kit.

[Department of Electronics And Communication Engineering, PSIT] 1


EXPERIMENT NO -1(b)
Objective:- Write a program to perform hexadecimal addition of two numbers.

Apparatus used: 8085 Microprocessor kit, Keyboard and Power supply.

Procedure: The following steps are required to implement the program-


1. Enter the numbers at memory location 200A H & 200B H.
2. The result is to be stored in the memory location 200C H.
3. Used GOTO Command for Executions.
4: Reset used before see the result at the location 2503 & 2504.

Program Code:-

Address Code Label mnemonic Operand comments

2000 21 0A 20 LXI H,200A HL points to the memory location 2000 H


2003 7E MOV A,M Get the contents of location 2000 H into the
accumulator
2004 23 INX H Increment HL to point to next Memory
location i.e. 2001H
2005 86 ADD M A = A + M i.e. compute the addition
2006 23 INX H Increment HL to point to next memory
location i.e. D002H
2007 77 MOV M,A Store the result at memory location D002 H
2008 76 HLT Terminate the execution of program

Data: 200A DATA (20)


200B DATA (25)
Result: 200C RESULT(45)
Store the result at memory location 200C H

Conclusion: The result of addition of two hexadecimal numbers is verified

Precautions:
1. Do not press any wrong key of the keyboard..
2. Feed the correct program.
3. Press desired key only..
4. Power supply Switched Off after completing the Experiment.
5: Do not touch any IC of the kit.

[Department of Electronics And Communication Engineering, PSIT] 2


EXPERIMENT NO-2(a)
Object :- Write a program using 8085 Microprocessor for addition of two BCD numbers.

Apparatus used: 8085 Microprocessor kit, Keyboard and Power supply.

Procedure: The following steps are required to implement the program-


1. Enter the numbers at memory location 2009 H & 200A H.
2. The result is to be stored in the memory location 200B H.
3. Numbers are represented in hexadecimal system.

Program Code:-

Address Code Label mnemonic operand Comments


2000 21,09,20 LXI H,2009 HL points to the memory location
2009 H
2003 7E MOV A,M Get the contents of location
2009 H into the accumulator
2004 23 INX H Increment HL to point to next
Memory location i.e. 200AH
2005 86 ADD M A = A – M i.e. compute the subtraction
2006 23 INX H Increment HL to point to next
memory location i.e. 200BH
2007 77 MOV M,A Store the result at memory
location 200B H
2008 76 HLT Terminate the execution of program

Data:

2009 DATA(2A)
200A DATA(7A)
Result:- 200B RESULT(A4)

Conclusion: The result of addition of two BCD numbers is verified.

Precautions:
1. Do not press any wrong key of the keyboard.
2. Feed the correct program.
3. Press desired key only.
4. Power supply Switched Off after completing the Experiment.
5: Do not touch any IC of the kit.

[Department of Electronics And Communication Engineering, PSIT] 3


Experiment 2 (b)
Objective: Write a program using 8085 Microprocessor for subtraction of two BCD numbers.

Apparatus used: - 8085 Development Kit,keyboard,power supply

Procedure:-The following steps are required to implement the program-


1. Enter the numbers at memory location 2501 & 2502.
2. The result is to be stored in the memory location 2503.
3. .Used GOTO Command for Executions.
4. .Reset used before see the result at the location 2503.

Program:-

Address Code Label Mnemonics Operand Comment


2000 21,02,25 LXI H,2502 Get address of 2nd number in H-L pa
2003 3E,99 MVI A,99 Place 99 IN accumulator
2005 96 SUB M 9’s compliment of 2nd number
2006 3C INR A 10’s compliment of 2nd number
2007 2B DCX H Get address of Ist number
2008 86 ADD M Add Ist number & 10’s complement of
2nd number.

2009 27 DAA Decimal adjustment


200A 32,03,25 STA 2503H Store result in 2503H
200D 76 HLT Halt

Data 2501 – 96
2502 – 38
Result
2503 – 58

Conclusion: The result of subtraction of two BCD numbers is verified.

Precautionss:
1. Do not press any wrong key of the keyboard.
2. Feed the correct program.
3. Press desired key only.
4. Power supply Switched Off after completing the Experiment.
5: Do not touch any IC of the kit.

[Department of Electronics And Communication Engineering, PSIT] 4


EXPERIMENT No. 3 (a)
Objective: -Write a program using 8085 Microprocessor for multiplication of two 8 bit numbers.

Apparatus used : - 8085 Development Kit, keyboard and power cable.

Procedure: - The following steps are required to implement the program-


1. Enter the numbers at memory location 2501,2502 and 2503
2. The result is to be stored in the memory location 2504 & 2505.
3. .Used GOTO Command for Executions.
4. .Reset used before see the result at the location 2504.

Program:
Address Code Label Mnemonics Operand Comments
2000 2A,01,25 LHLD 2501H Get multiplicand in H-L pair
2003 EB XCHG Multiplicand in D-E pair.
2004 3A,03,25 LDA 2503 H
2007 21,00,00 LXI H,0000 Initial value of product=00 in H-L
pair
200A 0E,08 MVI C,08 Count=8 in register C
200C 29 LOOP DAD H Shift partial product left by 1 bit.
200D 17 RAL Rotate multiplier left one bit. Is
multipler’s bit =1?
200E D2,12,20 JNC AHEAD No, go to AHEAD
2011 19 DAD D Product=produCt+Multiplicand
2012 AHEAD DCR C DECREMENT COUNT
2013 C2,02,20 JNZ LOOP
2014 22,04,25 SHLD 2504H Store result
2017 76 HLT STOP

Data:

2501- 84 H, LSBs of multiplicand.


2502- 00, MSBs of multiplicand.
2503- 56 H, Multiplier.

Result

2504 -58 H, LSBs of product.


2505 – 2C H, MSBs of product.
Conclusion: The result of multiplication of two 8 bit numbers is verified.
Precautionss:
1. Do not press any wrong key of the keyboard.
2. Feed the correct program.
3. Press desired key only.
4. Power supply Switched Off after completing the Experiment.
5: Do not touch any IC of the kit.

[Department of Electronics And Communication Engineering, PSIT] 5


EXPERIMENT No. 3 (b)
Objective: - Write a program using 8085 Microprocessor for division of two 8 bit numbers.

Apparatus used: - 8085 Development Kit.

Procedure:-

The following steps are required to implement the program-


1. Enter the numbers at memory location 201A &201B.
2. The result is to be stored in the memory location 201C.
3. .Used GOTO Command for Executions.
4. .Reset used before see the result at the location 201C.

Program

Memory Machine Label Mnemonics Operands Comments


address codes
2000 21,1A,20 START LXI H,201 A Set the memory pointer to
210A and store the dividend in
AC
2003 7E MOV A.,M
2004 23 INX H- Store the divisor in B register
2005 46 MOV B,M
2006 0E,00 MVI C,00 Clear the counter
2008 B8 CONT CMP B Compare the dividend &
divisor for dividend greater
than divisor. If not jump
2009 DA,11,20 JC ROUND
200C 90 SUB B Subtract the divisor from the
dividend
200D 0C INC C
200E C3 08 20 NMP CONT REPEAT
2011 07 ROUND RLC Multiply the dividend by two if
it was less than the divisor.
2012 B8 CMP B Test for dividend greater than
the divisor
2013 DA 17 20 JC DONE If not jump
2016 OC INX C
2017 23 DONE INX H Store the result in 201C.
2018 71 MOV M,C
2019 76 HLT STOP

[Department of Electronics And Communication Engineering, PSIT] 6


Data

201A-20H
201B-02H

Result
201C-10H

Conclusion: The result of Division of two 8 bit numbers is verified.


Precautions:

1. Do not press any wrong key of the keyboard..


2. Feed the correct program.
3. Press desired key only..
4. Power supply Switched Off after completing the Experiment.
5: Do not touch any IC of the kit.

[Department of Electronics And Communication Engineering, PSIT] 7


EXPERIMENT NO -4(a)
Objective: - Write a program to select largest numbers.

Apparatus used: 8085 Microprocessor kit, Keyboard and Power supply

Procedure:-
The following steps are required to implement the program-
1. Enter the numbers 32H,25H and 21H.
2. The result is to be stored in the memory location 2100H.
3. .Used GOTO Command for Executions.
4. .Reset used before see the result at the location 2100H.
Program Code:-

Address Code Label Mnemonic operand Comments


2000 3E,32 MVI A,32H A=32
2002 06,25 MVI B,25H B=25
2004 0E,21 MVI C,21H C=21
2006 B8 CMP B COMPARE A AND B
2007 D2,0B,20 JNC LB1 IF NOT CARRY COMPARE WITH B
200A 78 MOV A,B IF CARRY THEN 32H IS LARGEST NO.
200B B9 LB1 CMP C COMPARE A with C
200C D2,10,20 JNC LB2 IF NOT CARRY COMPARE WITH C
200F 79 MOV A,C
2010 32,00,21 LB2 STA 2100H STORE RESULT IN 2100H
2013 76 HLT TERMINATE PROGRAM

Data: 32H,25H and 21H

Result:- After Execution


Address-2100- 32

Conclusion: The largest number has been found from a given set of numbers.
Precautions:
1. Do not press any wrong key of the keyboard.
2. Feed the correct program.
3. Press desired key only.
4. Power supply Switched Off after completing the Experiment.
5: Do not touch any IC of the kit.

[Department of Electronics And Communication Engineering, PSIT] 8


EXPERIMENT NO- 4(b)
Object-: To find the smallest number from a given set of numbers.

Apparatus Used: - 8085 microprocessor training kit, keyboard and power supply

Procedure:-The following steps are required to implement the program-


1. Enter the numbers 42H,35H and 12H.
2. The result is to be stored in the memory location 2100H.
3. .Used GOTO Command for Executions.
4. .Reset used before see the result at the location 2100H.

Program:-

Memory Opcodes Label Mnemonics Operand Comment


Address
2000 3EH,42H MVI A,42H GET FIRST DATA
2002 06H, 35H MVI B,35H GET SECOND DATA
2004 0EH, 12H MVI C,12H GET THIRD DATA
2006 B8H CMP B COMPARE A AND B
2007 D2H, JNC(LB1) JMP IF NOT CARRY COMPARE
0DH,20H WITH B
200A C3H,0EH, 20H JMP(LB2) JMP TO ADRRESS LB2
200D 78H (LB1) MOV A,B
200E B9 (LB2) CMP C
200F D2H, 15H, JNC(LB3) Address
20H
2012 C3H,16 H,20H JMP(LB4) Address
2015 79H (LB3) MOV A,C
2016 32H,00H,21H (LB4) STA 2100H Address
2019 76 HLT

Data: 42H,35H and 12H

Result-After Execution- Address- 2100-12H

[Department of Electronics And Communication Engineering, PSIT] 9


Conclusion: The smallest number has been found from a given set of numbers.

Precautions:
1. Do not press any wrong key of the keyboard.
2. Feed the correct program.
3. Press desired key only.
4. Power supply Switched Off after completing the Experiment.
5: Do not touch any IC of the kit.

[Department of Electronics And Communication Engineering, PSIT] 10


EXPETRIMENT NO-5(a)

Objective: - Write a program to perform a string of numbers in ascending order.


Apparatus Used: - 8085 microprocessor training kit.
Procedure: Procedure is as follows:
1: Switch ON of 8085 microprocessor.
2: Now press the S of keyboard.
3: Enter the address 2000H.
4: Now feed the program and execute.
Program:-
Address code label Mnemonics Operands Comments
2000 21 50 20 start LXI H,2050H Load 16 bit address
2003 16 00 MVI D,09H Initialize D with 09H
2005 0E MOV C,D Initialize C for no. of data
2006 7E Check MOV A,M Move data from M to A
2007 23 INX H Increment stack pt.
2008 BE CMP M Compare M with A
2009 D2 14 20 JC NXTBT Jump when c=1
200C 46 MOV B,M Move M TO B
200D 77 MOV M,A Move M to A
200E 2B DCX H Decrement stack pt.
200F 70 MOV M,B Move B to M
2010 23 INX H Increment stack pt.
2011 16,o1 MVI D,01H Move immediate 01 to D
2013 0D NXTBT DCR C Decrement C For no. count.
2014 C2,07 20 JNZ Check Checking c=0 for ending
series
2017 7A DCR D Decrement D For no. count
2018 DA,00,20 JNZ Start Jump to start if carry flag is
set.
201B 76 HLT HLT

[Department of Electronics And Communication Engineering, PSIT] 11


Data: - 2050: 00, 2051: FF, 2052:11
Result- Before Execution- After Execution

Address-2050-00 2050-00
2051-FF 2051-11
2052-11 2052-FF
Conclusion: A string of numbers has been arranged in ascending order.
Precautions:
1. Do not press any wrong key of the keyboard..
2. Feed the correct program.
3. Press desired key only..
4. Power supply Switched Off after completing the Experiment.
5: Do not touch any IC of the kit.

[Department of Electronics And Communication Engineering, PSIT] 12


EXPERIMENT NO- 5(b)
Objective: - Write a program to perform a string of numbers in descending order .

Equipment Used: - 8085 microprocessor training kit. Keyboard and power supply.
Procedure: Procedure is as follows:
1: Switch ON of 8085 microprocessor.
2: Now press the S of keyboard.
3: Enter the address 2000H.
4: Now feed the program and execute.

Program:
Address code label Mnemonics Operands Comments
2000 21 50 20 start LXI H,2050H Load 16 bit address
2003 16 00 MVI D,09H Initialize D with 09H
2005 0E MOV C,D Initialize C for no. of data
2006 7E Check MOV A,M Move data from M to A
2007 23 INX H Increment stack pt.
2008 BE CMP M Compare M with A
2009 D2 14 20 JNC NXTBT Jump when c=0 or M<A
200C 46 MOV B,M Move M TO B
200D 77 MOV M,A Move M to A
200E 2B DCX H Decrement stack pt.
200F 70 MOV M,B Move B to M
2010 23 INX H Increment stack pt.
2011 16,o1 MVI D,01H Move immedidiate 01 to D
2013 0D NXTBT DCR C Decrement C For no. count.
2014 C2,07 20 JNZ Check Checking c=0 for ending
series
2017 7A DCR D Decrement D For no. count
2018 DA,00,20 JNZ Start Jump to start if carry flag is
set.
201B 76 HLT HLT

[Department of Electronics And Communication Engineering, PSIT] 13


Data: 2050: FF, 2051:00, And 2052:11

Result-

Initial Data after Execution


2050 FF FF
2051 00 11
2052 11 00

Conclusion: A string of numbers has been arranged in descending order.

Precautions:
1. Do not press any wrong key of the keyboard.
2. Feed the correct program.
3. Press desired key only.
4. Power supply Switched Off after completing the Experiment.
5: Do not touch any IC of the kit.

[Department of Electronics And Communication Engineering, PSIT] 14


EXPERIMENT NO -6 (a)
Object:- Write a program to convert given Hexadecimal number into its equivalent ASCII
number using 8085 instruction set.
Apparatus used: 8085 microprocessor kit, keyboard and power supply.
Procedure:-
1. Load the given data in A-register and move to B- register.
2. Mask the upper nibble of the Hexadecimal number in A-register
3. Call subroutine to get ASCII of lower nibble.
4. Store it in memory.
5. Move B-register to A- register and mask the lower nibble.
6. Rotate the upper nibble to lower nibble position.
7. Call subroutine to get ASCII of upper nibble.
8. Store it in memory.
9. Terminate the program
Program:-

Address Codes Label Mnemonics Operand Comments


2000 3A,00,42 LDA 4200H Load the given data in A-register
2003 47 MOV B,A move to B- register
2004 E6,0F ANI 0FH Mask the upper nibble of the Hexa
decimal number in A-register
2006 CD,1A,20 CALL SUB1 Call subroutine to get ASCII of lower
nibble
2009 32,01,42 STA 4201H Store it in memory
200C 78 MOV A,B Move B-register to A- register
200D E6,F0 ANI F0H mask the lower nibble
200F 07 RLC Rotate the upper nibble to lower
2010 07 RLC nibble position
2011 07 RLC
2012 07 RLC
2013 CD,1A,20 CALL SUB1 Call subroutione to get ASCII of
upper nibble
2016 32,02,42 STA 4202H Store it in memory
2019 76 HLT Terminate the program
201A FE,0A SUB1 CPI 0AH Compare with 0A
201C DA,1F,20 JC SKIP If carry go to skip
201F C6,30 SKIP ADI 30H Add with 30 H
2021 C9 RET

[Department of Electronics And Communication Engineering, PSIT] 15


Data:-
INPUT:- 4200 E4(Hex data)
Result:
OUTPUT:- 4201 34 (ASCII CODE)
4202 45 (ASCII CODE)

Conclusion: The conversion of given Hexadecimal number into its equivalent ASCII has been
performed.

Precautions:
1. Do not press any wrong key of the keyboard.
2. Feed the correct program.
3. Press desired key only.
4. Power supply Switched Off after completing the Experiment.
5: Do not touch any IC of the kit.

[Department of Electronics And Communication Engineering, PSIT] 16


EXPERIMENT NO -6 (b)
Object:- Write a program to convert given ASCII number into its equivalent Hexadecimal
number using 8085 instruction set.

Apparatus used: 8085 microprocessor kit, keyboard and power supply.

Procedure: Procedure is as follows:


1: First store given ASCII number in 4500H.
2: After go to command we get o/p hexa number in 4501 H.
Program:-

Address Code label mnemonics operand comments


2000 3A,00,45 LDA 4500H Store no. in accumulator
2002 D6,30 SUI 30H Subtract the no. with 30H
2004 FE,0A CPI 0AH Compare this no. With 0A
2006 DA,0B,20 JC SKIP if carry go to skip
2009 D6,07 SUI 07H If no carry subtract with 07H
200B 32,01,45 SKIP STA 4501H Store o/p hex no in 4501H
200E 76 HLT Terminate program

Data:-
INPUT 4500 31H
Result:
OUTPUT 4501 OBH

Conclusion: The conversion of given ASCII number into its equivalent Hexadecimal number
has been performed.

Precautions:
1. Do not press any wrong key of the keyboard..
2. Feed the correct program.
3. Press desired key only..
4. Power supply Switched Off after completing the Experiment.
5: Do not touch any IC of the kit.

[Department of Electronics And Communication Engineering, PSIT] 17


EXPERIMENT No. 7
Objective: - write a program to interface 8253 programmable interval timer to 8085 and verify
the operation of 8253 in different modes.

Apparatus used:- 8085 Development Kit, 8253 study Module.

Procedure:-
1. Connect 50 pin FRC cable from interface card to 8085 microprocessor.
2. Enter the program for selected mode (mode-3).
3. Connect the probe of oscilloscope at OUT 0.
4. Give +5V to Gate 0 & give the clock to Clock 0.
5. Execute the program & see the waveforms or see the given data on LED of study module.
Program:-

ADDRESS CODE LOOP MNEMONICS OPERAND COMMENTS


2000 3E,36 MVI A,36 Get control word
2002 D3,2B OUT 2B CWR FOR 8253
2004 3E,55 START MVI A,55 Get LSB of count
2006 D3,28 OUT 28
2008 3E,AA MVI A,AA GET MSB OF COUNT
200A D3,28 OUT 28
200C C3,04,20 JMP START jUMP TO START

Result: A square wave is observed which is generated by 8253.


Conclusion: An 8253 PTI has been interfaced with 8085 and operation for square mode has been
verified.
Precautions:
1. Do not press any wrong key of the keyboard.
2. Feed the correct program.
3. Press desired key only.
4. Power supply Switched Off after completing the Experiment.
5: Do not touch any IC of the kit.

[Department of Electronics And Communication Engineering, PSIT] 18


EXPERIMENT No. 8
Objective: - Write a program to interface DAC with 8085 to demonstrate the generation of
triangular wave.
Apparatus used: - 8085 Development Kit. , keyboard and power supply
Procedure:-
The following steps are required to implement the program-
1. Enter the numbers at memory location 706B to 70C0.
2. Execute this program at memory location 706B.

Program:-

Address Codes Label Mnemonics Operand Comments


6000H 3EH,80H MVI A, 80H Get control word
6002H D3H, 08H OUT 08H CWR FOR 8253
6004H 3EH,00H SATAR: MVI A, 00H Init. Digital input as 00
6006H D3H, 08H BACK: OUT 08H Init. Input as00 to
ADC
6008H 3CH INR A Construct ramp
6009H C2H,06H,60H JNZ BACK If not go back
600CH 3EH,FFH MVI A, FFH Init. Digital input as
FFH
600EH D3H, 08H BACK1: OUT 08H Init. Input as FFH to
ADC
6010H 3DH DCR A Construct ramp
6011H C2H,06H,0EH JNZ BACK1 If not go back
JMP START

Result: A triangular wave is observed which is generated by DAC.

Conclusion: An DAC has been interfaced with 8085 and operation for square mode has been
verified.
Precautions:
1. Do not press any wrong key of the keyboard.
2. Feed the correct program.
3. Press desired key only.
4. Power supply Switched Off after completing the Experiment.
5: Do not touch any IC of the kit.

[Department of Electronics And Communication Engineering, PSIT] 19


EXPERIMENT NO-9
Objective: Write a program to blink the LED,s connected at port A of 8255 .
Apparatus Used:
1. 8085 Microprocessor trainer kit.
2. Key Board
3. Power supply (SMPS)
4. 8255 Programmable peripheral interface.

Procedure: Procedure is as follows:


1. Connect the 8255 study card to 8085 kit with help of 50 pin FRC.
2. Check the polarity of cable for proper communication between kit and card.
3. Enter the program given from memory location 39FDHH.
4. Execute the program.
5. For single step mode keep switch in STEP position. After executing the program see
result on LED.
.

PROGRAM:

ADDRESS OPCODE LABEL MNEMONICS OPERAN COMMENT


D
39FDH 31,00,70 LXI SP,7000H
4100H 3E,80 START MVI A, 80H Load acc. by Control
word
4102H D3,F0 OUT F3H Stores the CW in CWR
4104H 3E,FF BACK MVI A, FFH Acc is loaded by FF H
4106H D3 OUT F0H Turn on the led,s
4108H 3E,FF CALL DELAY Call delay
410AH 3E,FF LOOP1 MVI A, 00H Acc is loaded by 00 H
410CH 0D LOOP OUT F0H Turn off the led,s
410DH C2,0C,41 CALL DELAY Call delay
4118H C3,04,41 JMP BACK repeat the sequence
5000 0E,FF DELAY MVI C,FFH Load value in C Reg.
5002 16,FF LOOP1 MVI D,FFH Load value in D Reg.
5004 15 LOOP DCR D Decrement by 1 in D reg.
5005 C2,04,50 JNZ LOOP If not zero go back
5008 0D DCR C Decrement by 1 in c reg.
5009 C2,02,50 JNZ LOOP1 If not zero go back
500C C9 RET Return to main program

[Department of Electronics And Communication Engineering, PSIT] 20


RESULT: The result of blinking of LEDs at port A is observed as desired.

Conclusion: An 8255 PPI has been interfaced with 8085 and I/O operation has been verified.

Precautions:
1. Do not press any wrong key of the keyboard.
2. Feed the correct program.
3. Press desired key only.
4. Power supply Switched Off after completing the Experiment.
5: Do not touch any IC of the kit.

[Department of Electronics And Communication Engineering, PSIT] 21


EXPERIMENT No. 10
Objective: - Write a program to interface stepper motor with 8085 and rotate a motor in clock
wise direction.
Apparatus used: - 8085 Development Kit,keyboard and power supply
Procedure:-
The following steps are required to implement the program-
1. Enter the numbers at memory location 706B to 70C0.
2. Execute this program at memory location 706B.

Program:-

Address Codes Label Mnemonics Operand Comments


7000 31,00,21 LXI SP,6500H Init stack pointer
7003 3E,80 MVI A,80H ;Init 8255 port A
7005 D3,0B OUT F3H Init control register
7007 3E,66 MVI A,66H Starting phase value
7009 D3,F0 BACK OUT F0H Send value to port
700A 07 RLC Rotate right acc
700B CD,00,50 CALL DELAY Call delay
700E C3,09,70 JMP BACK Repeat the sequence
5000 0E,FF DELAY MVI C,FFH Load value in C Reg.
5002 16,FF LOOP1 MVI D,FFH Load value in D Reg.
5004 15 LOOP DCR D Decrement by 1 in D reg.
5005 C2,04,50 JNZ LOOP If not zero go back
5008 0D DCR C Decrement by 1 in c reg.
5009 C2,02,50 JNZ LOOP1 If not zero go back
RET Return to main program

Result: The result of rotation of stepper motor is observed as desired

Conclusion: A stepper motor has been interfaced with 8085 and operation has been verified

Precautions:
1. Do not press any wrong key of the keyboard.
2. Feed the correct program.
3. Press desired key only.
4. Power supply Switched Off after completing the Experiment.
5: Do not touch any IC of the kit.

[Department of Electronics And Communication Engineering, PSIT] 22


[Department of Electronics And Communication Engineering, PSIT] 23

You might also like