Found 409 Articles for Microcontroller

Program to convert HEX to ASCII in 8085 Microprocessor

Arnab Chakraborty
Updated on 09-Oct-2019 07:38:49

576 Views

Here we will see one 8085 Microprocessor program. That program will convert HEX to ASCII values.Problem Statement −Write an 8085 Assembly language program to convert Hexadecimal characters to ASCII values.Discussion −We know that the ASCII of number 00H is 30H (48D), and ASCII of 09H is 39H (57D). So all other numbers are in the range 30H to 39H. The ASCII value of 0AH is 41H (65D) and ASCII of 0FH is 46H (70D), so all other alphabets (B, C, D, E, F) are in the range 41H to 46H.Here we are providing hexadecimal digit at memory location 8000H, The ASCII equivalent ... Read More

Program to convert ASCII to HEX in 8085 Microprocessor

Arnab Chakraborty
Updated on 09-Oct-2019 07:36:07

511 Views

Here we will see one 8085 Microprocessor program. This program will convert ASCII to HEX values.Problem Statement −Write an 8085 Assembly language program to convert ASCII to Hexadecimal character values.Discussion −We know that the ASCII of number 00H is 30H (48D), and ASCII of 09H is 39H (57D). So all other numbers are in the range 30H to 39H. The ASCII value of 0AH is 41H (65D) and ASCII of 0FH is 46H (70D), so all other alphabets (B, C, D, E, F) are in the range 41H to 46H.Here the logic is simple. We are checking whether the ASCII value is ... Read More

Program to convert HEX to BCD in 8085 Microprocessor

Arnab Chakraborty
Updated on 09-Oct-2019 07:34:22

872 Views

Here we will see one 8085 program that will convert binary numbers (HEX) to its BCD equivalent.Problem Statement−A binary number is stored at location 800H. Convert the number into its BCD equivalent and store it to the memory location 8050H.Discussion−Here we are taking a number from the memory, and initializing it as a counter. Now in each step of this counter we are incrementing the number by 1, and adjust the decimal value. By this process we are finding the BCD value of binary number or hexadecimal number.We can use INR instruction to increment the counter in this case but ... Read More

Program to convert BCD to HEX in 8085 Microprocessor

Arnab Chakraborty
Updated on 09-Oct-2019 07:31:29

602 Views

Here we will see one 8085 program, that program will convert BCD numbers to HEX equivalent.Problem Statement −A BCD number is stored at location 802BH. Convert the number into its binary equivalent and store it to the memory location 802CH.Discussion −In this problem we are taking a BCD number from the memory and converting it to its binary equivalent. At first we are cutting each nibble of the input. So if the input is 52 (0101 0010) then we can simply cut it by masking the number by 0FH and F0H. When the Higher order nibble is cut, then rotate it to ... Read More

Executing the program and checking result in 8085 Microprocessor

Arnab Chakraborty
Updated on 09-Oct-2019 07:27:42

4K+ Views

Here we will see how to use 8085 to write a program in 8085 kit. We will also see how to debug the program and check the result after successful execution.Let us see a typical keypad structure of 8085 kit. (This keyboard pattern may vary in different kits of different manufacturers)The following table will show the functionalities of different control keys. There are 16 alphanumeric keys (0-9, A-F) to provide data and address −KeysFunctionalitiesRESETReset the systemVCT INTVector Interrupt. It generates hardware interrupt RST 7.5 via keypadSHIFTProvides second level commands to all keysGOExecute the programSIExecute in Single Step ModeEXREGExamine Register. It ... Read More

Program to multiply two 16-bit binary numbers in 8085 Microprocessor

Arnab Chakraborty
Updated on 09-Oct-2019 07:18:22

662 Views

Here we will see one program for Intel 8085 Microprocessor. This program will calculate the multiplication of two 16-bit numbers.Problem Statement −Write an 8085 Assembly language program to multiply two 16-bit numbers stored at 8000H - 8001H and 8002H - 8003H.Discussion −This program takes the 16 bit data from memory location 8000H – 8001H and 8002H – 8003H. The 32 bit results are stored at location 8050H – 8053H.Here we have tested with two 16 bit numbers. The results are as follows.1111H × 1111H = 01234321H 1C24H × 0752H = 00CDFF88HInputfirst inputAddressData……800011800111800211800311……second inputAddressData……80002480011C800252800307……Flow DiagramProgramAddressHEX CodesLabelsMnemonicsCommentsF00031, 00, 20LXI SP, 2000HInitialize Stack pointerF0032A, 00, 80LHLD ... Read More

Program to multiply two 2-digit BCD numbers in 8085 Microprocessor

Arnab Chakraborty
Updated on 09-Oct-2019 07:14:56

375 Views

Here we will see 8085 Microprocessor program, that will find the multiplication result of two BCD numbers.Problem Statement −Write an 8085 Assembly language program to find two BCD number multiplication. The numbers are stored at location 8000H and 8001H.Discussion −In this program the data are taken from 8000H and 8001H. The result is stored at location 8050H and 8051H.As we know that 8085 has no multiply instruction so we have to use repetitive addition method. In this process after each addition we are adjusting the accumulator value to get decimal equivalent. When carry is present, we are incrementing the value of MS-Byte. ... Read More

Program to multiply two 8-bit numbers (shift and add method) in 8085 Microprocessor

Arnab Chakraborty
Updated on 09-Oct-2019 07:12:17

571 Views

Let us see one 8085 Microprocessor problem. In this problem we will see how to multiply two numbers using shift and add methods, not by using additive approach.Problem Statement −Write an 8085 Assembly language program to multiply two 8-bit numbers using shift and add method.Discussion −The shift and add method is an efficient process. In this program, we are taking the numbers from memory location 8000H and 8001H. The 16 bit results are storing into location 8050H onwards.In this method we are putting the first number into DE register pair. The actual number is placed at E register, and D is holding ... Read More

Program to add the contents of N word locations in 8085 Microprocessor

Arnab Chakraborty
Updated on 09-Oct-2019 07:10:00

275 Views

Here we will see one 8085 Microprocessor program. This program will add the contents of N word locations.Problem Statement −Write an 8085 Assembly language program to add N 16-bit numbers stored into memoryDiscussion −The 16-bit numbers are stored into memory location 8001H onwards. The value of N is stored at location 8000H. After addition, the result will be stored at location 8050H onwards.In 8085 we have few number of registers. So we are storing the count into memory, when we need to update it, we will fetch it from memory, update it and then again store it into memory.Here the 16-bit numbers ... Read More

Program to perform selection sort in descending order in 8085 Microprocessor

Arnab Chakraborty
Updated on 09-Oct-2019 07:07:59

186 Views

Here we will see one 8085 Microprocessor program. This program will sort a sequence of numbers in reverse order using selection sort technique.Problem Statement −Write an 8085 Assembly language program to sort a given sequence using selection sort in descending order. The numbers are stored at 8001H onwards. 8000H is holding the block size.Discussion −In the selection sorting technique, we will choose the minimum or the maximum term from a set of numbers. In this case we are considering the sorting in descending order, so we are choosing the maximum number. By taking the maximum number, we are swapping it with the ... Read More

Advertisements