Archive for the ‘Lab Manuals’ Category

Program for Arithmatic operations in 89C51

AIM: To write programs for i. Addition ii. Subtraction iii. Multiplication iv. Division of two numbers in 89C51. Addition PROGRAM MOV R0,#00 MOV DPTR,#4200 MOVX A,@DPTR MOV B,A INC DPTR MOVX A,@DPTR ADD A,B JNC LABEL1 INC R0 LABEL1 : INC DPTR MOVX @DPTR,A MOV A,R0 INC DPTR MOVX @DPTR,A HERE : SJMP HERE SAMPLE OUTPUT ADDRESSES DATA INPUT/OUTPUT 4200 05 Input 4201 04 Input 4202 09 Output 4203 00 Output Subtraction PROGRAM MOV R0,#00 MOV DPTR,#4200 MOVX A,@DPTR MOV B,A INC DPTR MOVX A,@DPTR SUBB A,B JNC LABEL1 INC R0 LABEL1 INC DPTR MOVX @DPTR,A MOV A,R0 INC DPTR…

Read More

8085 program-Ascii to Decimal conversion

AIM To prepare a program for 8085 to convert a decimal number to its corresponding ASCII number and to convert a given ASCII TO decimal. PROGRAM FOR DECIMAL TO ASCII CONVERSION LDA 4200 CPI 0A JC LABEL1 ADI 30 JMP LABEL2 LABEL1:MVI A,EE LABEL2:STA 4201 HLT SAMPLE OUTPUT: ADDRESS DATA INPUT/OUTPUT 4200 01 Input 4201 31 Output PROGRAM FOR ASCII TO DECIMAL CONVERSION LDA 4200 SUI 30 JC LABEL2 CPI 0A JC LABEL1 LABEL2:MVI A,EE LABEL1:STA 4201 HLT SAMPLE OUTPUT ADDRESS DATA INPUT/OUTPUT 4200 36 Input 4201 06 Output RESULT A program to convert decimal to ascii and ascii to…

Read More

Program to seperate bytes to nibbles in 8085

AIM:To prepare an assembly language program for 8085 to  separate  the nibbles of an 8 bit number. PROGRAM: MVI C,00 LDA 4200 MOV C,A ANI OF STA 4201 MOV A,C ANI F0 RRC RRC RRC RRC STA 4202 HLT SAMPLE OUTPUT ADDRESS DATA INPUT/OUTPUT 4200 A3 INPUT 4201 03 OUTPUT 4202 0A OUTPUT RESULT:A program to separate the nibbles of a byte was prepared and output obtained. Note: Complete list of 8085 Assembly Language programs are available in CircuitsToday. Find Link below: 8085 Microprocessor Programs-Lab Manual

Read More

Counting of number of zeros,even and odd numbers in an array

AIM :To prepare an assembly language program for 8085 to count the number of zeros,even and odd numbers in an array PROGRAM MVI C,00 MVI D,00 MVI E,00 LXI H,4200 MOV B,M INX H LXI H,4200 MOV B,M LABEL4:INX H MOV A,M CPI 00 JNZ LABEL1 INR C JNZ LABEL2 LABEL1:RRC JNZ LABEL3 INR D JMP LABEL2 LABEL3:INR E LABEL2:DCR B JNZ LABEL4 INX H MOV A,C MOV M,A INX H MOV A,D MOV M,A INX H MOV A,E MOV M,A HLT SAMPLE OUTPUT ADDRESS DATA INPUT/OUTPUT 4200 09 Input 4201 00 Input 4202 06 Input 4203 02 Input 4204…

Read More

Square root of an 8 bit number in 8085

AIM To prepare an assembly language program  to find the square root of an 8 bit number for 8085 microprocessor PROGRAM MVI C,01 MVI E,01 LDA 4200 LABEL:SUBB C JZ LABEL1 INR C INR C INR E JMP LABEL LABEL1:MOV A,E STA 4201 HLT SAMPLE OUTPUT ADDRESS DATA INPUT/OUTPUT 4200 10 Input 4201 04 Output RESULT A program to find the square root of a number was prepared and output obtained

Read More

Division of Two 8 bit numbers in 8085

AIM:To prepare an assembly language program for 8085 to multiply two 8 bit numbers PROGRAM MVI C,00 LDA 4200 MOV B,A LDA 4201 LABEL:SUBB B INR C JNC LABEL DCR C ADD B STA 4202 MOV A,C STA 4203 HLT SAMPLE OUTPUT ADDRESS DATA INPUT/OUTPUT 4200 02 Input 4201 05 Input 4202 01 Output 4203 02 Output RESULT A program to divide two 8 bit numbers  for 8085 was prepared and output obtained

Read More

Multiplication of Two 8 bit numbers in 8085

AIM To prepare an assembly language program for 8085 to multiply two 8 bit numbers PROGRAM MVI C,00 LDA 4200 MOV B,A LDA 4201 MOV A,D MVI A,00 LABEL:ADD B DCR D JNZ LABEL JNC LOOP INR C LOOP:STA 4202 MOV A,C STA 4203 HLT SAMPLE OUTPUT ADDRESS DATA INPUT/OUTPUT 4200 04 Input 4201 02 Input 4202 08 Output 4203 00 Output RESULT A program to multiply two 8 bit numbers was prepared and output obtained

Read More

Addition of Two 16 bit numbers in 8085

AIM:To prepare a program to add two 16 bit numbers for 8085 PROGRAM MVI E,00 LHLD 4200 MOV C,L MOV B,H LHLD 4202 DAD B JNC LABEL1 INR E LABEL1:SHLD 4204 MOV A,E STA 4206 HLT SAMPLE OUTPUT ADDRESS DATA INPUT/OUTPUT 4200 F6 Input 4201 A3 Input 4202 2F Input 4203 B4 Input 4204 25 Output 4205 68 Output 4206 01 Output(carry) RESULT A program to add two 16 bit numbers for 8085 was prepared and output obtained

Read More

Addition of Two 8 bit numbers in 8085

AIM To add two 8 bit numbers using 8085 microprocessor PROGRAM MV1 C,00 LDA 4200 MOV B,A LDA 4201 ADD B JNC LABEL1 INRC LABEL1:STA 4202 MOV A,C STA 4203 HLT SAMPLE OUTPUT ADDRESS DATA INPUT/OUTPUT 4200 15 Input 4201 27 Input 4202 3C Output(sum) 4203 00 Output(carry) RESULT A program to add two 8 bit numbers for 8085 microprocessor was prepared and output obtained.

Read More

INTRODUCTION TO MICROPROCESSOR TRAINER KIT AND PROGRAMMING

                                               In our experiments we used Micro 85 EB trainer kit from Vi Micro systems. The steps involved in doing programs in trainer kit are summarized below.   1.Write  the program 2.Prepare the hex code of the program 3.Enter the hex code to trainer kit in suitable locations(eg:From 4100 H) 4.Give sufficient data for program in data memory(eg:From 4200 H) 5.Run the program 6.Check for output   The programming procedure  is explained through an example. Consider the case of addition of two 8 bit numbers.   1.WRITE THE PROGRAM                      MV1 C,00                    LDA 4200                     MOV B,A…

Read More