Found 409 Articles for Microcontroller

8085 Program to convert ASCII to binary

Anvi Jain
Updated on 30-Jul-2019 22:30:24

3K+ Views

Now let us see a program of Intel 8085 Microprocessor. This program will convert ASCII to binary values.Problem StatementWrite 8085 Assembly language program to convert ASCII to binary or Hexadecimal character values. DiscussionWe know that the ASCII of number 00H is 30H (48D), and ASCII of 09H is39H (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 ... Read More

8085 Program to find the HCF of two given bytes

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:24

2K+ Views

In this program we will see how to find the HCF or GCD of two numbers using 8085.Problem StatementWrite 8085 Assembly language program to find the HCF of two numbers stored at memory location 8000H and 8001H.DiscussionThis problem is solved by the Euclidean algorithm to find HCF. This algorithm is very simple.The algorithm steps are as follows −If first number and second number are same, thengo to step 3.Else if first number < second number, then exchange no1 andno2.first-number A, then exchange B and AF00D90SUB B   if B < A, subtract B from AF00EC3, 06, F0JMP LOOP  Jump to LOOPF01148EXGMOV ... Read More

8085 Program to find the smallest number

Rishi Rathor
Updated on 30-Jul-2019 22:30:24

8K+ Views

In this program we will see how to find the smallest number from a block of bytes using 8085.Problem StatementWrite 8085 Assembly language program to find the smallest number from a block of bytes.DiscussionIn this program the data are stored at location 8001H onwards. The 8000H is containing the size of the block. After executing this program, it will return the smallest number and store it at location 9000H.Logic is simple, we are taking the first number at register B to start the job. In each iteration we are getting the number from memory and storing it into register A. ... Read More

8085 Program to perform linear search

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:24

1K+ Views

In this program we will see how to search an element in a block of bytes using 8085.Problem StatementWrite 8085 Assembly language program to search a key value in a block of data using linear search technique.DiscussionIn this program the data are stored at location 8002H to 8007H. The 8000H is containing the size of the block, and 8001H is holding the key value to search.After executing this program, it will return the address of the data where the item is found and store the address at location 9000H and9001H. If the item is not found, it will return FFFFH.If ... Read More

8085 Program to Exchange 10 bytes

Anvi Jain
Updated on 30-Jul-2019 22:30:24

3K+ Views

In this program we will see how to exchange a block of 10-byte data using 8085.Problem StatementWrite 8085 Assembly language program to exchange a block of data, where block size is 10.DiscussionThe data are stored at location 8010H to 8019H and 9010H to 9019H. The location 8000H is holding the number of bytes to exchange. In this case number of bytes are 10D so it will be 0AH.The logic is very simple, The HL and DE register pair is pointing the first and second data block respectively. By taking the data we are just swapping the values of each memory ... Read More

8085 Program to Divide a 16-bit number by an 8-bit number

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:24

3K+ Views

In this program we will see how to divide a 16-bit number by an 8-bit numberProblem StatementWrite 8085 Assembly language program to divide a 16-bit number by an 8-bit number.DiscussionIn this program we are taking the 16-bit number from 8000H and 8001H. The 8000H is holding the lower order byte and 8001H is holding higher order byte. The8002H is holding the 8-bit numerator. After dividing the number the16-bit quotient is stored at location 8050H and 8051H. The remainderis stored at 8052H.InputAddressData......80002B8001CA800253......Flow DiagramProgramAddressHEX CodesLabelsMnemonicsCommentsF00021, 00, 80LXI H, 8000HPoint 8000HaddressF0037EMOV A, MStore the lower order byteF00423INX H   Increase the HL pair to ... Read More

8085 Executing the program and checking result

Rishi Rathor
Updated on 30-Jul-2019 22:30:24

5K+ Views

In this section 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 indifferent kits of different manufacturers)The following table will show the functionalities of different control keys. There are 16alphanumeric keys (0-9, A-F) to provide data and address −KeysFunctionalitiesRESETReset the systemVCT INTVector Interrupt. It generates hardware interruptRST 7.5 via keypadSHIFTProvides second level commands to all keysGOExecute the programSIExecute in Single Step ModeEXREGExamine Register. It allows ... Read More

8085 Program to convert HEX to BCD

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:24

5K+ Views

In this program we will see how to convert binary numbers to its BCD equivalent.Problem StatementA binary number is store dat location 800H. Convert the number into its BCD equivalent and store it to the memory location 8050H.DiscussionHere 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 INRinstruction to increment the counter in this case but this instruction will ... Read More

8085 Program to convert BCD to HEX

Anvi Jain
Updated on 30-Jul-2019 22:30:24

3K+ Views

In this program we will see how to convert BCD numbers to binary equivalent.Problem StatementA BCD number is stored at location 802BH. Convert the number into its binary equivalent and store it to the memory location 802CH.DiscussionIn 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 the left ... Read More

8085 Program to perform bubble sort in descending order

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:24

5K+ Views

In this program we will see how to sort a block of bytes in descending order using bubble sorting technique.Problem StatementWrite8085 Assembly language program to sort numbers in descending order where n number of numbers are stored in consecutive memory locations starting from 8041H and the value of n is available in memory location 8040H (Using BUBBLE sort).DiscussionIn this program we will arrange the numbers in bubble sorting technique. In this sorting technique, it will be executed in different pass. In each pass the smallest number is stored at the end of the list. Here we are taking the numbers ... Read More

Advertisements