Search for notes by fellow students, in your own course and all over the country.
Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.
Title: Microprocessor lab manual
Description: The entire set of experiments related to microprocessor.
Description: The entire set of experiments related to microprocessor.
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
MICROPROCESSOR
Manual
CONTENTS
ALLOCATED
S
...
NO
1
FAMILIARIZATION OF 8085 MP
AIM: To familiarize the 8085MP Trainer Kit & Simulation software
...
EX
...
ALGORITHM:
load the data to memory 9000
store the data in 9102
stop the program
FLOW CHART:
START
LOAD THE DATA TO MEMORY 9000
STORE THE DATA I N 9102
HLT
PROGRAM:
ADDRESS LABEL
8000
8001
8002
8003
8004
8005
8006
MNEUMONICS
LDA
00
90
STA
02
91
HLT
RESULT:
BEFORE EXECUTION:
MEMORY
DATA
OP-CODE
3A
00
90
32
02
91
76
COMMENTS
LOAD THE DATA IN A
STORE THE DATA IN 9102
STOP THE PROGRAM
AFTER EXECUTION:
9102
REGISTER
2A
9000
DATA
2A
3) Exchange the 8 Bit Data to Register to Register
ALGORITHM:
load the data to accumulator
exchange the data to registers B,C,D,E,H,L
...
NO
3
8 BIT ARITHMETIC OPERATION
AIM: To write program & execute following operation
1
...
Two 8 bit multiplication & Division
3
...
ALGORITHM:
Load the data
Move to accumulator
Increment the register
Add the data
Store the value
Check the carry
Increment the counter
Store the data
Stop the program
Or
START
LOAD THE DATA IN HL REGISTER
MOVE THE DATA TO ACCUMULATOR
INCREMENT THE HL REGISTER
ADD THE DATA
STORE THE DATA IN 9100
CHECK,IF CARRY IS ZERO
JUMP IF NO
CARRY
I
INCREMENT THE CARRY
MOVE TO ACCUMULATOR
STORE THE DATA IN 9101
HLT
`
PROGRAM:
ADDRESS
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
800A
800B
800C
800D
800E
800F
8010
8011
LABEL
LOOP
MNEUMONICS
LHI H
00
90
MOV A,M
INX H
ADC M
STA
00
91
JNC LOOP
INR C
MOV A,C
STA
01
91
HLT
OP-CODE
21
00
90
7E
23
8E
32
00
91
D2
11
80
0C
79
32
01
91
76
COMMENTS
LOAD HL PAIR 9000
MOVE MEMORY TO A
INCREMENT REGISTER PAIR
ADD WITH CARRY
STORE IN 9100
JUMP IF NON ZERO
INCREMENT C
MOVE C TO A
STORE IN 9101
STOP THE PROGRAM
RESULT:
BEFORE EXECUTION :
AFTER EXECUTION
MEMORY
DATA
MEMORY
DATA
9000
9001
02
0F
9100
9101
12
FF
1) TWO 8 BIT SUBTRACTION WITH BORROW
ALGORITHM:
Load the data
move to accumulator
increment the register
subtract the data
store the value
check the borrow
decrement the counter
store the data
Stop the program
PROGRAM:
ADDRESS
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
800A
800B
800C
800D
800E
800F
8010
8011
LABEL
LOOP
MNEUMONICS
LHI H
00
90
MOV A,M
INX H
SUB M
STA
00
91
JNC LOOP
DCR C
MOV A,C
STA
01
91
HLT
OP-CODE
21
00
90
7E
23
96
32
00
91
D2
11
80
0D
79
32
01
91
76
COMMENTS
LOAD HL PAIR 9000
MOVE MEMORY TO A
INCREMENT REGISTER PAIR
SUBTRACT WITH BORROW
STORE IN 9100
JUMP IF NON ZERO
DECREMENT C
MOVE C TO A
STORE IN 9101
STOP THE PROGRAM
FLOWCHART
START
LOAD THE DATA IN HL REGISTER
MOVE THE DATA TO ACCUMULATOR
INCREMENT THE HL REGISTER
SUB THE DATA
STORE THE DATA IN 9100
CHECK,IF BORROW IS ZERO
STORE THE DATA IN 9100
I
DECREMENT THE COUNTER
MOVE TO ACCUMULATOR
STORE THE DATA IN 9101
HLT
RESULT:
BEFORE EXECUTION :
MEMORY
9000
9001
DATA
02
0F
AFTER EXECUTION
MEMORY
9100
9101
TWO 8 BIT MULTIPLICATION
ALGORITHM:
Load the data to HL register pair
Move B to memory
Increment H
Move M to C
Decimal adjust accumulator
Add B
Jump on non carry
Increment D register
Decrement C
Jump if non zero
Store the data
Move D to A
Store the data
Stop the program
DATA
F3
FF
START
LOAD THE DATA IN HL REGISTER
MOVE THE DATA MEMORY TO B
INCREMENT THE HL REGISTER
MOVE M TO C
DECIMAL ADJUST ACCUMULATOR
ADD B
INCREMENT D REGISTER
DECREMENT C
JUMP IF NO
CARRY
STORE THE DATA
MOVE D TO A
STORE THE DATA
HLT
PROGRAM:
ADDRESS
8000
8001
8002
8003
8004
LABEL
MNEUMONICS
LXI H
MOV B,M
INX H
8005
8006
8007
8008
8009
800A
800B
800C
800D
800E
800F
8010
8011
8012
8013
8014
8015
8016
8017
MOV C,M
DAA
ADD B
JNC LOOP
OP-CODE
21
00
90
46
23
4E
27
80
D2
0C
80
14
0D
C2
06
80
32
00
91
7A
32
01
91
76
INR D
DCR C
JNZ LOOP
STA 9100
MOV A,D
STA 9101
HLT
RESULT:
BEFORE EXECUTION:
MEMORY
9000
9001
DATA
02
02
AFTER EXECUTION
MEMORY
DATA
9100
9101
04
00
COMMENTS
LOAD HL PAIR
MOVE MEMORY TO B
INCREMENT REGISTER
PAIR
MOVE M TO C
DECIMAL ADJUSTMENT A
ADD B
JUMP IF NON CARRY
INCREMENT D
DECREMENT C
JUMP IF NON ZERO
STORE IN 9100
MOVE D TO A
STORE IN 9101
STOP THE PROGRAM
TWO 8 BIT DIVISION
ALGORITHM:
Load the hl register
Move to B
Get the second data &load in A
Compare the two numbers
Subtract 2 numbers
Increment the value of carry
Check the carry
Stop the program
PROGRAM :
ADDRESS LABEL
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
800A
800B
800C
800D
800E
800F
8010
8011
8012
8013
8014
8015
8016
8017
8018
MNEUMONICS
LXI H
MOV B,M
MVI C,00
NEXT:
INX H
MOV A,M
CMP B
JC LOOP
SUB B
INR C
JMP NEXT
LOOP:
STA
MOV A,C
STA
HLT
OP-CODE
21
00
90
46
0E
00
23
7E
B8
DA
11
18
90
0C
C3
08
80
32
02
90
79
32
03
90
76
COMMENTS
GET THE DIVIDEND IN B-REG
CLER C-REG FOR QOUTIENT
INCREMENT H-REG
GET THE DIVISOR IN A-REG
COMPARE A-REG WITH B-REG
JUMP ON CARRY LOOP
SUBTRACT A-REG FROM B-REG
INCREMENT C-REG
JUMP TO NEXT
STORE THE REMINDER IN MEMORY
STORE THE QUOTIENT IN MEMORY
STOP THE PROGRAM
START
LOAD THE DATA IN HL REGISTER
MOVE THE DATA MEMORY TO B
CLEAR C REGISTER
INCREMENT H REGISTER
MOVE THE DATA MEMORY TO A -REG
COMPARE B REGISTER
JUMP IF NO
CARRY
SUBTRACT B REGISTER
INCREMENT C
JUMP TO NEXT
STORE THE DATA
MOVE A TO C
STORE THE DATA
HLT
RESULT:
BEFORE EXECUTION :
MEMORY
9000
9001
DATA
05
06
TWO 8 BIT AND
ALGORITHM:
load the data to hl pair
mov the data to b
increment hl pair
move b to a
and register
store the data
stop the program
FLOW CHART:
AFTER EXECUTION
MEMORY
9002
9003
DATA
01
01
START
LOAD THE DATA IN HL REGISTER
MOVE THE DATA MEMORY TO B
INCREMENT H REGISTER
MOVE B TO A
AND REGISTER WITH MEMORY
STORE THE DATA
HLT
PROGRAM:
ADDRESS
8000
8001
8002
8003
8004
8005
8006
8007
8008
LABEL
MNEUMONICS
LXI H
MOV B,M
INX H
MOV A,B
ANA M
STA
HLT
OP-CODE
21
00
90
46
23
78
A6
32
76
COMMENTS
LOAD HL PAIR
MOVE M TO A
RESULT:
BEFORE EXECUTION :
MEMORY
9000
9001
AFTER EXECUTION
DATA
MEMORY
02
02
9100
DATA
04
TO 8 BIT OR LOGIC
ALGORITHM:
load the data
mov the data A to b
OR register with memory
Store the data
Stop the program
PROGRAM:
ADDRESS LABEL
8000
8001
8002
8003
8004
8005
8006
8007
MNEUMONICS
MVI A,00
MOV A, B
ORA
STA
HLT
OP-CODE
3E
00
78
B6
32
00
91
76
COMMENTS
START
LOAD THE DATA
MOVE THE DATA B To A
OR REGISTER WITH MEMORY
STORE THE DATA
HLT
RESULT:
BEFORE EXECUTION :
MEMORY
9000
9001
DATA
01
02
AFTER EXECUTION
MEMORY
9100
DATA
03
TO EXECUTE THE PROGRAM WITH NOT FUNCTION
ALGORITHM:
load the data
mov the data A to b
compare the data with accumulator
Store the data
Stop the program
FLOW CHART:
START
LOAD THE DATA
MOVE THE DATA B To A
COMPARE WITH ACC
STORE THE DATA
HLT
PROGRAM:
ADDRESS
8000
8001
8002
8003
8004
8005
8006
8007
LABEL
MNEUMONICS
MVI A,00
MOV A, B
CMP A
STA
HLT
OP-CODE
3E
00
78
BF
32
00
91
76
RESULT:
BEFORE EXECUTION :
AFTER EXECUTION
COMMENTS
MEMORY
9000
DATA
01
MEMORY
9100
DATA
01
EX
...
To transfer the 16bit data register to external memory
2
...
NO
5
8 BIT LOGICAL OPERATION
AIM: To write program & execute following operation
1
...
Two 16 bit AND ,OR ,NOT XOR & Rotate Left & right
EQUIPMENTS REQUIREMENT:
Or
8051 MC Trainer Kit
CPU With Keil Simulation
TWO 16 BIT ADDITION WITH CARRY
ALGORITHM:
load the data to hl register pair
exchange the data to de
load the hl pair
double addition
jnc loop
increment c
move a to c
store hl pair data
stop
PROGRAM:
ADDRESS
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
800A
800B
800C
800D
800E
800F
8010
LABEL
MNEUMONICS
LHLD
XCHG
LHLD
DAD D
JNC LOOP
INR C
MOV A,C
STA
SHLD
OP-CODE
2A
00
90
EB
2A
02
90
19
D2
13
80
0C
79
32
03
91
22
COMMENTS
LOAD HL PAIR DIRECT
EXCHANGE TO DE
LOAD HL PAIR DIRECT
DOUBLE ADDITION
JUMP ON NO CARRY
INCREMENT C
MOV C TOA
STORE IN 9103
STORE HL DIRECTLY IN 9100
8011
8012
8013
8014
8015
8016
LOOP:
SHLD
HLT
00
91
22
00
91
76
STORE HL DIRECTLY IN 9100
STOP THE PROGRAM
START
LOAD THE DATA IN HL REGISTER
EXCHANGE THE HL PAIR TO DE PAIR
LOAD THE HL REGISTER DIRECTLY
DOUBLE ADDITION WITH D
JUMP IF NO
CARRY
INCREMENT THE C REGISTER
MOVE THE DATA FROM C TO A
STORE IN 9103
STORE HL DIRECTLY IN 9100
STORE HL DIRECTLY IN 9100
HLT
RESULT:
BEFORE EXECUTION :
MEMORY
DATA
9000
9001
9002
9003
50
40
20
10
AFTER EXECUTION
MEMORY
DATA
9100
9101
90
70
TWO 16 BIT SUBTRACTION WITH BORROW
ALGORITHM:
load the data to hl register pair
exchange the data to de
load the hl pair
subtraction
jnc loop
increment c
mov a to c
store hl pair data
stop
PROGRAM:
ADDRESS
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
800A
LABEL
MNEUMONICS
LHLD
XCHG D
LHLD
MOV A,E
SUB L
STA
OP-CODE
2A
00
90
EB
2A
02
90
7B
95
32
01
COMMENTS
LOAD HL PAIR DIRECT
EXCHANGE TO DE
LOAD HL PAIR DIRECT
MOVE E TO A
SUBTRACT L
STORE IN 9001
800B
800C
800D
800E
800F
8010
8011
MOV A,D
SUB H
STA
HLT
90
7A
94
32
02
91
76
START
LOAD THE DATA IN HL REGISTER
EXCHANGE THE HL PAIR TO DE PAIR
LOAD THE HL REGISTER DIRECTLY
MOVE THE DATA FROM E TO A
SUBTRACT L
STORE THE DATA IN 9101
MOVE THE DATA FROM D TO A
SUBTRACT H
STORE THE DATA IN 9102
HLT
FLOWCHART
MOV D TO A
SUBTRACT H
STORE IN 9102
STOP THE PROGRAM
RESULT :
BEFORE EXECUTION
MEMORY
DATA
9000
01
9001
01
9002
22
9003
F0
AFTER EXECUTION
MEMORY
DATA
9100
02
9101
12
9102
01
EX
...
To find the given number palindrome or not
2
...
To find the given number palindrome or not
Load data to accumulator
...
Rotating the data left four times
...
If it is equal, display FF
...
Stop the program
...
Move memory value to C-register
...
Addition
Decrement B-register value
...
Load immediate value to accumulator
...
Stop the program
...
NO
7
Finding Largest and Smallest Number
AIM: To write program & execute following operation
To find largest & Smallest number
EQUIPMENTS REQUIREMENT:
8085 MP Trainer Kit
CPU With 8085 Simulation
ALGORITHM:
Load data to HL register pair
Copying value to accumulator
Incrementing address of HL pair
Copying data to B register
Comparing B register value with accumulator
If accumulator value is larger ,store it to memory
If not, store B register value to memory
If they are equal store data ‘FF’ to memory
FLOW FLOW CHART:
START
LOAD DATA TO HL
PAIR
COPY VALUE TO ACCUMULATOR
INCREMENTING ADDRESS OF HL
PAIR
COPYING DATA TO B-REGISTER
COMPARE
A &B
VALUES
IF A VALUE IS LARGER, STORE IT
TO MEMORY
IF NOT STORE B REGISTER VALUE
TO MEMORY
STOP
PROGRAM:
ADDRESS
LABEL
8000
MNEMONICS
LXI H,9000
8003
MOV A,M
OPCODE
COMMENT
(MEANING)
21
LOADING
00
VALUE TO HL
90
PAIR
7E
ACC ← M
INCREMENTING
8004
INX H
23
THE ADDRESS
8005
MOV B,M
46
B←M
8006
CMP B
B8
COMPARING
8007
JNC LOOP:
D2
8008
MOV A,B
78
ACC ← B
32
STORING
00
VALUE TO
91
MEMORY
8009
STA 9100
3A
800C
LDA 9000
00
90
800F
STA 9101
8012
JMP LOOP1
32
STORING
01
VALUE TO
91
MEMORY
C3
JUMP
3A
8013
LOOP:
LDA 9000
00
90
8016
8019
STA 9100
LDA 9001
32
STORING
00
VALUE TO
91
MEMORY
3A
01
90
8022
STA 9101
8025
LOOP1
32
STORING
01
VALUE TO
91
MEMORY
STOP THE
76
PROGRAM
RESULT:
BEFORE EXECUTION
EXECUTION
MEMORY
DATA
9000
45
9001
69
AFTER
MEMORY
DATA
9100
69
9101
45
EX
...
Initialize HL pair as memory pointer
...
Get the count at 4200 into c – register
...
Copy it in D-register (for bubble sort (N-1) times required)
...
Get the first value in a-register
...
Compare it with the value at next location
...
If they are out of order, exchange the contents of A-register and memory
...
Decrement D-register content by 1
...
Repeat steps 5 and 7 till the value in D-register become zero
...
Decrement C-register content by 1
...
Repeat steps 3 to 9 till the value is in C-register becomes zero
...
Initialize HL pair as memory pointer
...
Get the count at 4200 into c – register
...
Copy it in D-register (for bubble sort(N-1)times required)
...
Get the first value in a-register
...
Compare it with the value at next location
...
If they are out of order, exchange the contents of A-register and memory
...
Decrement D-register content by 1
...
Repeat steps 5 and 7 till the value in D-register become zero
...
Decrement C-register content by 1
...
Repeat steps 3 to 9 till the value is in C-register becomes zero
...
NO
9
Finding Square root of a Number
AIM: To write program & execute following operation
To find the Finding Square root of a Number
EQUIPMENTS REQUIREMENT:
8085 MP Trainer Kit
or
CPU With Keil Simulation
ALGORITHM:
Loading value(Y) TO accumulator
Copying the accumulator value to B register
Loading immediate data to C register
Call division subroutine to get initial value in the d register
...
Get ((Y/X) +X) in A-register
...
Get x in A-register
Compare X and XNEW
...
Save the square rot in memory
FLOW CHART
START
LOAD THE DATA
TO ACCUMULATOR
COPYING DATA TO B REGISTER
LOADING IMMEDIATE VALUE
TO C-REGISTER
CALL DIVISION SUBROUTINE
TO GET INITIAL VALUE
COPY VALUE TO E REGISTER
LOADING SECOND VALUE TO
ACCUMULATOR
COPY D-REGISTER VALUE TO C
REGISTER
COPY D REGISTER VALUE TO
ACCUMULATOR
AD ACCUMULATOR VALUE TO E
REGISTER VALUE
COMPARE D REGISTER VALUE
WITH ACCUMULATOR VALUE
STORE ACCUMULATOR VALUE TO
MEMORY
STOP
PROGRAM:
ADDRESS
LABEL
8000
MNEMONICS
LDA 9000
OPCODE
3A
COMMENT
(MEANING)
ACC←0xFF
00
90
8003
MOV B,A
8004
MVI C,02H
8006
CALL DIV
CD
D ← ACC
MOV E,D
5A
E←D
8008
MOV A,B
78
A←B
8009
MOV C,D
4A
C←D
800A
CALL DIV
CD
CALL
800B
MOV A,D
7A
←
800C
ADD E
83
ADDITION
800D
MVI C,02H
0E
LOADING
02
VALUE TO C
800F
CALL DIV
CD
CALL
8010
MOV A,E
7B
A←E
8011
CMP D
BE
COMPARE
8012
JNZ REP
C2
8007
REP
47
0E
O2
B ← ACC
C ← ACC
32
8013
STA 9100
00
M←A
91
8016
RESULT:
HLT
76
HALT PRG
BEFORE EXECUTION
EXECUTION
MEMORY DATA
9000
64
AFTER
MEMORY DATA
9100
0A
EX
...
DAC Interface Board
...
Load the initial value 00) to accumulator and move it to DAC
...
Call the delay program
...
Load the final value (FF) to accumulator and move it to DAC
...
Call the delay program
...
Repeat steps 2 to 5
...
Load the initial value to accumulator
...
Move the accumulator content to DAC
...
Increment the accumulator content by 1
...
Repeat steps 2 to 5
...
2
...
4
...
6
...
8
...
Move the accumulator content to DAC
...
If the accumulator content is zero processed to next step
...
Load value (FF) to accumulator
...
Decrement the accumulator content by 1
...
Else go to step 7
...
If acc is
zero
PROGRAM:
[SQUARE WAVE GENERATION]
ADDRESS
LABEL
MNEUMONICS
OP-CODE
8000
MVI A,00
3E
8001
8002
8003
8004
8005
DELAY
OUT
CALL
JMP
MVI B,05
00
D3
CD
C3
06
8007
8006
LOOP 1
MVI C,FF
05
0E
8007
8008
LOOP2
DCR C
FF
0D
8009
800A
JNZ
DCR B
C2
05
800B
800C
JNZ
RET
C2
C9
DELAY
COMMENTS
Copying the data to
accumulator
Call a subroutine
jump
Moving the data to
accumulator
Copying the data to
accumulator
Decrementing C
register
Jump on not zero
Decrementing B
register
Jump on not zero
Return from subroutine
[STAIRCASE WAVE GENERATION]
ADDRESS
LABEL
MNEUMONICS
OP-CODE
8001
MVI A,00
3E
8002
8003
OUT
INR A
D3
3C
8004
8005
JNZ
JMP
C2
C3
COMMENTS
Moving the data to
accumulator
Incrementing the accumulator
value
Jump on not zero
jump
[TRIANGULAR WAVE GENERATION]
ADDRESS
8001
8002
8003
8004
8005
8006
8007
8008
8009
800A
800B
800C
LABEL
MNEUMONICS
MVI L,00
LOOP1
MOV A,L
INR L
JNZ
MVI L,FF
LOOP2
OP-CODE
2E
00
7D
MOV A,L
2C
C2
2E
FF
7D
OUT
DCR L
JNZ
JMP
D3
2D
C2
C3
COMMENTS
Moving the data to register
Moving data from L register to
accumulator
Incrementing L register
Jump on to non zero
Moving the value (FF) to L register
Moving data from L register to
accumulator
Decrementing L register
Jump on not zero
Jump
RESULT:
Thus the square, triangular and staircase wave form were generated
Title: Microprocessor lab manual
Description: The entire set of experiments related to microprocessor.
Description: The entire set of experiments related to microprocessor.