0% found this document useful (0 votes)
330 views

Microprocessor Lab Manual

The document describes four experiments conducted on an 8085 microprocessor kit. Experiment 1 describes the keys on the keyboard of the 8085 kit and provides a memory map. Experiment 2 describes the steps to enter a program and execute it on the 8085 kit. Experiments 3(A) and 3(B) describe programs written to add and subtract two 8-bit numbers, respectively. Experiments 4(A) and 4(B) describe programs written to multiply and divide two 8-bit numbers, respectively.

Uploaded by

Priyanshu Kumari
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
330 views

Microprocessor Lab Manual

The document describes four experiments conducted on an 8085 microprocessor kit. Experiment 1 describes the keys on the keyboard of the 8085 kit and provides a memory map. Experiment 2 describes the steps to enter a program and execute it on the 8085 kit. Experiments 3(A) and 3(B) describe programs written to add and subtract two 8-bit numbers, respectively. Experiments 4(A) and 4(B) describe programs written to multiply and divide two 8-bit numbers, respectively.

Uploaded by

Priyanshu Kumari
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

EXPERIMENT-1

 AIM: Familiarization of different keys of 8085 microprocessor kit and its memory map.
 APPARATUS: 8085 kit.
 DIAGRAM:

Reset VCT Shift C D E F


INT

RTG INSD DELD 8 9 A B


SI

DEL INS REL 4 5 6 7


GO BM EMEM

STRG MEMC FILL 0 1 2 3


PRG NEXT

Keyboard of 8085 kit


 THRORY:-
KEYBOARD DESCRIPTION:
Vinytics 8085 kit has 28 keys and six-seven segment display to communicate with the outside world. As
kit is switches ON ,a message –‘UP 85’ is displayed on the display and all keys are in command mode.
The keyboard is as shown below:
 RESET:- Reset the system.
 VCT INT:- Hardware interrupt via keyboard, RST 7.5.
 SHIFT:- Provides a second level command to all keys.
 GO:- To execute a program.
 SI:- To execute the program on single step mode.
 EXREG:- EXAMINE REGISTER; allows user to examine and modify the contents of different
register.
 PRE:- Previous is used as an intermediate terminator in case of examine memory.
 DEL:- DELETE the part of the program or data with relocation, by one or more bytes.
 INS:- Inserts the part of the program or data with relocation, by one or more bytes.
 B.M:- BLOCK MOVE allows user to move a block of memory to any RAM area.
 FILL:- Allows user to fill RAM area with a constant.
 REL:- RELOCATES a program written for some memory area and to be transferred to other
memory area.
 INS DATA:- INSERT DATA insert one or more data bytes in the user’s program/data area.
 STRING:- Finds out the string of data lying at s particular address or addresses.
 MEMC:- MEMORY COMPARE: compare two blocks of memory for equality.
 O TO F:- Hexadecimal keys.
Memory Map of kit:
0000H TO OFFFH = ERROM(2732)
1000H TO 17FFH = RAM#1(6 1/6)
1800H TO 1FFFH = RAM#2(6 1/6)
2000H TO 27FFH = RAM#3(6 1/6)
2800H TO 2FFMH = RAM#4(6 1/6)
309FH TO 300FH = 256bytes of user stop
30AOH TO 3FFFH = fold back memory
4000H TO FFFFH = expendable memory
EXPERIMENT-2

 AIM:- Exercise the steps to enter program and to execute a program on 8085 micro processor kit.
 APPARATUS:- 8085 up kit.
 PROCEDURE:-
1) Switch on the power supply and kit will display “UP 8085”.
2) Press reset ~ examine memory ~ program starting memory address ~ next ~ opcode ~ next and
so on upto the end of program opcodes
3) To execute the program press Reset ~ go ~ starting address ~ execute buttons
4) To check the result press Reset ~ examine memory~Memory address(where the result has been
stored in program) ~Next.
Experiment:-3(A)
 Aim:- Writing and execution of ALP for the addition of two 8-bit numbers.
 Apparatus:- 8085 kit.
 Program:

Memory address. Opcode(HEX) Mnemonics Comment


st
2000 3E MVI A 56H Place 1 number in accumulator
2001 56 .
2002 06 MVI B 49H Place 2nd number in B register
2003 49
2004 80 ADD B Add the contents of A &B registers
2005 32
2006 03 STA 2503H Store the contents of Accumulator at
2007 25 2503 H memory address

2008 76 STOP End of Program

 PROCEDURE:
1. Switch on the power supply and kit will display “UP 8085”.
2. Press reset ~ examine memory ~ program starting memory address ~ next ~ opcode ~ next
and so on up to the end of program opcodes
3. To execute the program press Reset ~ go ~ starting address ~ execute buttons
4. To check the result press Reset ~ examine memory~Memory address(where the result has
been stored in program) ~Next.
 Result: We have seen the result 9F H which is the addition of 56H and 49H at the memory
address 2503H
Experiment:-3(B)
 Aim:- Writing and execution of ALP for the Subtraction of two 8-bit numbers.
 Apparatus:- 8085 kit.
 Program:

Memory address. Opcode (HEX) Mnemonics Comment


st
2000 3E MVI A 56H Place 1 number in accumulator
2001 56 .
2002 06 MVI B 49H Place 2nd number in B register
2003 49
2004 90 SUB B Subtract the contents of A &B registers
2005 32
2006 03 STA 2503H Store the contents of Accumulator at
2007 25 2503 H memory address

2008 76 STOP End of Program

 PROCEDURE:
1. Switch on the power supply and kit will display “UP 8085”.
2. Press reset ~ examine memory ~ program starting memory address ~ next ~ opcode ~ next
and so on up to the end of program opcodes
3. To execute the program press Reset ~ go ~ starting address ~ execute buttons
4. To check the result press Reset ~ examine memory~Memory address(where the result has
been stored in program) ~Next.

 Result: We have seen the result 0D H which is the subtraction of 56H and 49H at the memory
address 2503H
EXPERIMENT-4(A)
 Aim:- Write a program for the multiplication of two 8-bit numbers.
 Apparatus:- 8085 kit.
 Program:

Memory OPCODE Mnemonics Comments


Address (Hex)
2000 26 Place the 1st number in H register
MVI H, 02H
2001 02
2002 2E Place the 2nd number in L register
MVI L, 03H
2003 03
2004 3E Initialize the accumulator to 00H
MVI A, 00H
2005 00
2006 84(X) ADDH Add the contents of H and A register

2007 2D DCRL Decrement the contents of L register by 1

2008 C2 Jump to ‘X (2006H)’ if contents of above


2009 06 JNZ (X) register (L register) is not zero
200A 20
200B 32 Store the contents of Accumulator to
200C 02 STA 2202H 2202H Memory address
200D 22
200E 76 HLT End of Program

 PROCEDURE:
1. Switch on the power supply and kit will display “UP 8085”.
2. Press reset ~ examine memory ~ program starting memory address ~ next ~ opcode ~ next
and so on up to the end of program opcodes
3. To execute the program press Reset ~ go ~ starting address ~ execute buttons
4. To check the result press Reset ~ examine memory~Memory address(where the result has
been stored in program) ~Next.

 Result: We have seen the result 06 H which is the multiplication of 02H and 03H at the memory
address 2202H
EXPERIMENT-4(B)
 AIM:- Write a program for the division of two 8- bit numbers.
 Apparatus:- 8085 kit.
 Program:

Memory Address OPCODE (Hex) Mnemonics Comments


2000-01 3E, 08 MVI A, 08H Place the 1st number in accumulator
2002-2003 06,02 MVIB,02H Place the 2nd number in B register
Initialize the C register (which will
2004-2005 0E, 00 MVIC, 00H
store the value for quotient) to 00H
Subtract the contents of B register
2006 90 (Y) SUBB
from Accumulator
Jump to ‘X (200EH)’ if the result of
2007-09 FA,0E,20 JM (X)
above subtraction has minus sign
200A OC INRC Increment the contents of Register C
200B-OD C3,06,20 JMP (Y) Jump to ‘Y (2006H)’
Add the contents of B register &
200E 80 (X) ADDB
accumulator
Store the contents (Remainder of
2OOF-11 32,03,25 STA,2503H Division) of Accumulator at 2503H
memory address
Move the contents (Quotient) in C
2012 79 MOVA, C
register to A register
Store the contents of Accumulator at
2013-15 32,02,25 STA,2502H
2502H memory address
2016 76 HLT End of the Program

 PROCEDURE:
1. Switch on the power supply and kit will display “UP 8085”.
2. Press reset ~ examine memory ~ program starting memory address ~ next ~ opcode ~ next
and so on up to the end of program opcodes
3. To execute the program press Reset ~ go ~ starting address ~ execute buttons
4. To check the result press Reset ~ examine memory~Memory address(where the result has
been stored in program) ~Next.

 Result: We have seen the result 04 H (quotient) & 00H (remainder) of division of 08H & 02H at the
memory address 2502H & 2503H respectively.
EXPERIMENT-5(A)
 Aim:- Writing and execution of ALP for arranging the elements of array in ascending order.
 Apparatus:- 8085 kit.
 Program:

Memory Address OPCODE (Hex) Mnemonics Comments


Set the counter (in D register) at the total no. of
2000-01 16,05 MVI D,05H
elements you have to arrange in ascending order
Load the H-L register pair with the starting address
2002-2004 21,00,25 (Z) LXI H,2500H
of the elements to be arranged
MVI Set one more counter in L register which indicate
2005-2006 0E,09
L,04H the total no. of elements still left to arrange
Move the contents of Memory addressed by H-L
2007 7E(Y) MOVA,M
pair into A register
2008 23 INX H Increment the contents of H-L pair
Compare the contents of Accumulator & memory
2009 BE CMP M
addressed by H-L Register pair
Jump to ‘X (2012H) if carry produced after the
200A-OC DA,12,20 JC (X)
execution of previous instrucion
MOV Move the contents of Memory addressed by H-L
200D 46
B,M pair into B register
Move the contents of A register into Memory
200E 77 MOVM,A
addressed by H-L register pair
200F 2B DCX H Decrement the contents of H-L register pair by 1
Move the contents of B register into Memory
2010 70 MOVM,B
addressed by H-L pair
2011 23 INXH Increment the contents of H-L register pair by 1

2012 OD (X) DCRC Decrement the contents of C register pair by 1


Jump to “Y(2007) if the result produced after the
2013-15 C2,07,20 JNZ (Y)
execution of previous instruction is not Zero
2016 15 DCRD Decrement the contents of D register pair by 1
Jump to “Z(2002) if the result produced after the
2017-19 C2,02,20 JNZ (Z)
execution of previous instruction is not Zero
201A 76 HLT End of Program
 PROCEDURE:
1. Switch on the power supply and kit will display “UP 8085”.
2. Press reset ~ examine memory ~ program starting memory address ~ next ~ opcode ~ next
and so on up to the end of program opcodes
3. To execute the program press Reset ~ go ~ starting address ~ execute buttons
4. To check the result press Reset ~ examine memory~Memory address(where the result has
been stored in program) ~Next.
 Result: We have seen all the five numbers arranged in ascending order which are stored at memory
locations from 2500H to 2504H
EXPERIMENT-5(B)
 Aim:- Writing and execution of ALP for arranging the elements of array in descending order.
 Apparatus:- 8085 kit.
 Program:

MemoryAddress OPCODE (Hex) Mnemonics Comments


Set the counter (in D register) at the total no. of
2000-01 16,05 MVI D,05H
elements you have to arrange in ascending order
Load the H-L register pair with the starting address
2002-2004 21,00,25 (Z) LXI H,2500H
of the elements to be arranged
Set one more counter in L register which indicate
2005-2006 0E,09 MVI L,04H
the total no. of elements still left to arrange
Move the contents of Memory addressed by H-L
2007 7E(Y) MOVA,M
pair into A register
2008 23 INX H Increment the contents of H-L pair
Compare the contents of Accumulator & memory
2009 BE CMP M
addressed by H-L Register pair
Jump to ‘X (2012H) if no carry produced after the
200A-OC DA,12,20 JNC (X)
execution of previous instruction
Move the contents of Memory addressed by H-L
200D 46 MOV B,M
pair into B register
Move the contents of A register into Memory
200E 77 MOVM,A
addressed by H-L register pair
200F 2B DCX H Decrement the contents of H-L register pair by 1
Move the contents of B register into Memory
2010 70 MOVM,B
addressed by H-L pair
2011 23 INXH Increment the contents of H-L register pair by 1
2012 OD (X) DCRC Decrement the contents of C register pair by 1
Jump to “Y(2007) if the result produced after the
2013-15 C2,07,20 JNZ (Y)
execution of previous instruction is not Zero
2016 15 DCRD Decrement the contents of D register pair by 1
Jump to “Z(2002) if the result produced after the
2017-19 C2,02,20 JNZ (Z)
execution of previous instruction is not Zero
201A 76 HLT End of Program
 PROCEDURE:
1. Switch on the power supply and kit will display “UP 8085”.
2. Press reset ~ examine memory ~ program starting memory address ~ next ~ opcode ~ next
and so on up to the end of program opcodes
3. To execute the program press Reset ~ go ~ starting address ~ execute buttons
4. To check the result press Reset ~ examine memory~Memory address(where the result has
been stored in program) ~Next.
 Result: We have seen all the five numbers arranged in descending order which are stored at memory
locations from 2500H to 2504H
EXPERIMENT-6
 Aim:- Write and execution of ALP for 0-9 BCD counter ( up/down counter).
 Apparatus:- 8085 kit.
 Program:
Memory Address OPCODE (Hex) Mnemonics Comments

2000-01 3E,00 MVIA,00H Initialize the counter at 00H


Load H-L register pair with 2200H
2002-2004 21,00,22 LXIH,2200H
Memory address
Move the contents of A Register into
2005 77(X) MOVM,A
memory addressed by H-L pair
2006 3C INR A Increment the contents of A register by 1
Increment the contents of H-L register pair
2007 23 INXH
by 1
Compare the immediate data ‘0A’ with the
2008-09 FE,0A CPI,0A
contents of accumulator
Jump to ‘X(2005H) if the result after the
200A-DC C2,05,20 JNZ (X) execution of previous instruction is not
zero
Move the immediate data ‘09H’ into
2OOD-OE 3E,09 MVIA,09
Accumulator
200F 3D DCR A (Y) Decrement the contents of A register by 1
Move the contents of A register to
2010 77 MOVM,A
Memory addressed by H-L pair
2011 23 INX H Increment the contents of H-L register pair
Compare the immediate data ‘00H’ with
2012-13 FE,00 CPI,00
the contents of accumulator
Jump to ‘X(200FH) if the result after the
2014-16 CE,0F,20 JNZ (Y) execution of previous instruction is not
zero
2017 76 HLT End of Program
 PROCEDURE:
1. Switch on the power supply and kit will display “UP 8085”.
2. Press reset ~ examine memory ~ program starting memory address ~ next ~ opcode ~ next
and so on up to the end of program opcodes
3. To execute the program press Reset ~ go ~ starting address ~ execute buttons
4. To check the result press Reset ~ examine memory ~Memory address(where the result has
been stored in program) ~Next.
 Result: We have seen the numbers from 0-9 and then from 9-0 starting from the memory address
2200

You might also like