Documente Academic
Documente Profesional
Documente Cultură
AIM:
To write an assembly language program to find square of a number using 8085
PROCEDURE
a) Facilities required doing the experiment:
1. 8085 Microprocessor Kit 1
2. DC Power Supply 5V 1
b) Procedure for doing the experiment:
1. Start the program. Store the 16-bit data into the accumulator.
2. Initialize the counter. Move the content of accumulator to the data pointer.
3. Terminate the program
c) Program:
SQUARE OF 8-BIT
d) Output:
AIM:
To write an assembly language program to find square and cube of a number using 8085
PROCEDURE
a) Facilities required doing the experiment:
1. 8085 Microprocessor Kit 1
2 .DC Power Supply 5V 1
b) Procedure for doing the experiment:
1. Start the program. Store the 16-bit data into the accumulator.
2. Initialize the counter. Move the content of accumulator to the data pointer.
3. Terminate the program.
c) Program:
8-BIT SQUARE ROOT
d) Output:
e) Result:
3. SQUARE (16-bit)
AIM:
To write an assembly language program to find square of a 16-bit number using 8085
PROCEDURE
a) Facilities required doing the experiment:
1. Start the program. Store the 16-bit data into the accumulator.
2. Initialize the counter. Move the content of accumulator to the data pointer.
3. Terminate the program.
c) Program:
SQUARE OF 16-BIT
811F DCX H 2B
8120 ADC M 86
8121 DAA 27
8122 MOV E ,A 5F
8123 CC DC,00,86
8126 INX H 23
8127 DCR M 35
8128 JNZ(L2) C2,1E,81
812B XCHG EB
812C SHLD 8700 22,00,87
812F HLT 76
CALL SUBROUTINE
d) Output:
e) Result:
AIM:
To write an assembly language program to find square root of a 16-bit number using 8085
PROCEDURE
a) Facilities required doing the experiment:
1. 8085 Microprocessor Kit 1
2 .DC Power Supply 5V 1
1. Start the program. Store the 16-bit data into the accumulator.
2. Initialize the counter. Move the content of accumulator to the data pointer.
3. Terminate the program.
c) Program:
Continue….next page
CALL SUBROUTINE
8500 L) DAD D 19
8501 DCR A 3D
8502 JNZ (L) C2,00,85
8505 RET C9
d) Output:
e) Result:
AIM:
To write an assembly language program to convert a 2-digit BCD (8-bit) data to Hex
decimal
PROCEDURE
d) Output:
AIM:
To write an assembly language program to convert an 8-bit Hex to BCD
PROCEDURE
a) Facilities required doing the experiment:
c) Program:
HEX TO BCD 8-BIT
2B 00 04 03 43
0A 00 01 00 10
5A 00 09 00 90
60 00 09 06 96
5F 00 09 05 95
e) Result:
AIM:
To write an assembly language program to convert a 2-digit BCD (16-bit) data to Hex
decimal
PROCEDURE
a) Facilities required doing the experiment:
CALLSUROUTINE:
C) Output
BCD to Hex 16-bit
e) Result:
CALL SUBROUTINE:
d) Output
Hex to BCD 16-bit
e) Result:
AIM:
To write an assembly language program to convert a 8-bit Binary number to ASCII
Code.
PROCEDURE
a) Facilities required doing the experiment:
For Subroutine:
1. Compare the content of A reg with 0AH.
2 .If CY=1 go to step 4, If CY=0 go to next step.
3. Add 07H to A reg.
4. Add 30H to A reg.
5. Return to main program.
c) Program:
d) Output:
e) Result:
AIM:
To write an assembly language program to convert an array of ASCII Code to
Corresponding binary (hex) value
PROCEDURE
a) Facilities required doing the experiment:
c) Program:
d) Output:
e) Result:
AIM:
To write an assembly language program to rotate the motor in forward and reverse
Direction using 8085
PROCEDURE
a) Facilities required doing the experiment:
1. 8085 Microprocessor Kit 1
2 .8279 interfacing Kit 1
3 .DC Power Supply 5V 1
b) Procedure for doing the experiment:
1. Start the program.
2. The port and 8279 are initiated. Set the count for 4-stepping sequence.
3. Call subroutine wait for 1ms. Decrement the counter.
4. Count zero is checked then set the count for 4-stepping sequence else go to
initializing ports.
5. Terminate the program.
c) Program-I (for Continuous Rotation)
DIRECTION
RESULT:
AIM:
To generate the square wave, Triangle wave, Ramp wave at the DAC output.
PROCEDURE
a) Facilities required doing the experiment:
8255A Chip
PORT A DC
PORT B DD
PORT C DE
CONTROL WORD DF
CIRCUIT:
H) DATA:
I) Result:
AIM:
To write an assembly language program to display time using 8085.
PROCEDURE
a) Facilities required doing the experiment:
c) Program:
Clock Program
8600 00 to 23 hours
8601 00 to 59 min
8602 00 to 59 sec
d) Result:
AIM:
To write an assembly language program to convert 8-bit digital input into analog
output Unipolar and Bipolar method using 8085.
PROCEDURE
a) Facilities required doing the experiment:
PORT A DC
PORT B DD
PORT C DE
CONTROL WORD DF
CIRCUIT:
D) OUTPUT
UNIPOLAR BIPOLAR
RF = RF =
RESULT:
AIM:
To write an assembly language program to convert 8-bit digital input into analog output
R – 2R method using 8085.
PROCEDURE
a) Facilities required doing the experiment:
Formula:
𝑒𝑟𝑟𝑜𝑟
Accuracy = ×100%
𝑓𝑢𝑙𝑙 𝑠𝑐𝑎𝑙𝑒 𝑟𝑒𝑎𝑑𝑖𝑛𝑔
1
Resolution = × 100%
2𝑛 −1
8255A Chip
PORT A DC
PORT B DD
PORT C DE
CONTROL WORD DF
CIRCUIT:
Rf = KΩ ( kilo ohm )
D) Result :
ii) Resolution =
iii) Accuracy =
AIM:
To write an assembly language program to interface a Hex Keyboard using 8085.
PROCEDURE
a) Facilities required doing the experiment:
ADDRESS OPCODE
8600 3F
8601 06
8602 5B
8603 4F
8604 66
8605 6D
8606 7D
8607 07
8608 7F
8609 6F
860A 77
860B 7C
860C 39
860D 5E
860E 79
860F 71
D) RESULT:
AIM:
To write an assembly language program for sum of simple series and arithmetic
program of an N-elements of 8-bit using 8085
PROCEDURE
a) Facilities required doing the experiment:
8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 840A 840B 8601 8600
Department of Physics
04 01 5C 0A 03 00 6A
05 4C 1D 04 5F 0F 00 DB
06 5F 3E 06 08 0A 1B 00 D0
07 7F 2B 1D 09 5B 2C 5D 01 B4
|
08 25 3E 5F 2A 1E 3F 20 15 01 7E
09 5C 30 12 1C 2A 5B 50 15 3D 01 E1
0A 15 6E 4C 09 83 5F 32 14 1D 3A 02 57
0B 20 14 0F 8C 2D 3B 18 06 29 5B 6C 02 45
S r i B h a r a t h i W o m e n ’ s A r t s & S c i e n c e C o l l e g e ∎ P a g e | 41
M Gopinathan
S r i B h a r a t h i W o m e n ’ s A r t s & S c i e n c e C o l l e g e ∎ P a g e | 42
𝒏
Program for sum of series arithmetic progression: S=𝟐 [𝟐𝒂 + (𝒏 − 𝟏)𝒅]
TABLE:
𝒏
N d a S= [𝟐𝒂 + (𝒏 − 𝟏)𝒅]
𝟐
( 8200 ) (8201) ( 8202) (8601) (8600)
0A 04 03 00 24
06 02 07 00 48
05 0A 01 00 69
08 05 0C 00 EC
0A 0F 0B 03 11
0C 0E 0D 04 38
Result:
AIM:
To write a program to run a stepper motor using stepper motor with
microcontroller - 8051
PROCEDURE
a) Facilities required doing the experiment:
1. 8051 Microcontroller Kit 1
2. DC Power Supply 5V 1
b) Procedure for doing the experiment:
1. Start the process
2. Select the mode of rotation
3. Rotate the motor
4. Stop the process
Rotation through a degree for 4 times
1. Choose the angle to rotate the number for 4 times through the selected angle.
2. Stop the process.
RESULT:
AIM:
To write an assembly language program for Addition and Subtraction using
microcontroller - 8051.
PROCEDURE
a) Facilities required doing the experiment:
ADDITION
1. Clear the program status word
2. Select the register bank by giving proper values to Rs1 and RS0 of PSW
3. Load the accumulator A reg with any decided 8-bit
4. Load the register R0 with the 2nd 8-bit data
5. Add these two 8-bit number
6. Store the data
7. Stop the process
SUBTRACTION
ADDITION PROGRAM
ADDITION TABLE:
INPUT OUTPUT
9000 9001 9002
05 03 08
03 07 0A
02 02 04
AF 03 62
CD FF BC
0F 5F 6E
RESULT:
SUTRACTION PROGRAM
SUTRACTION TABLE
INPUT OUTPUT
9000 9001 9002
03 05 02
04 07 03
0F 5F 50
37 47 10
AE EF 41
DE FE 20
RESULT:
AIM:
To write an assembly language program for multiplication and division using
microcontroller - 8051.
PROCEDURE
a) Facilities required doing the experiment:
MULTIPLICATION
1. Get the multiple in the accumulator
2. Get the multiplicand in the B reg
3. Multiply A with B reg
4. Store the result in memory location
5. Stop the process
DIVISION
MULTIPLICATION:-
MULTIPLICATION TABLE:
INPUT OUTPUT
9200 9201 9202
04 00 00
0A 0C 78
1A 2E AC
8A 0E 8C
03 05 0F
0F 5F 91
06 02 0C
0A 05 14
RESULT:
DIVISION:-
INPUT OUTPUT
9300 - DIVISOR 9301- DIVIDEND 9302 - QUOTIENT 9303- REMAINDER
04 02 02 00
RESULT:-