Microcontroller Articles

Page 10 of 33

Program to do an operation on two BCD numbers based on the contents of X in 8085 Microprocessor

Arnab Chakraborty
Arnab Chakraborty
Updated on 09-Oct-2019 503 Views

Here we will see one 8085 program. This program will perform different operations on BCD numbers based on choice.Problem Statement −Write an 8085 Assembly language program to perform some operations on two 8-bit BCD numbers base on our choice.Discussion −In this program we are taking a choice. The choice value is stored at memory location 8000H (named as X). And the BCD numbers are stored at location 8001H and 8002H. We are storing the result at location 8050H and 8051H.Here if the choice is 00H, then it will perform addition, for 01H, it will perform subtraction, and for 02H, it will do ...

Read More

Program to convert a 16-bit binary number to BCD in 8085 Microprocessor

Arnab Chakraborty
Arnab Chakraborty
Updated on 09-Oct-2019 789 Views

Here we will see one 8085 Microprocessor program. This program will be used to convert 16-bit binary data to BCD data.Problem Statement −Write an 8085 Assembly language program to convert 16-bit binary data to BCD data. The binary data is stored at location 8000H and 8001H.Discussion −This problem is solved by implementing 16-bit counter. We are storing the 16-bit number at first, then decreasing the numbers one by one, and increasing the decimal value by adjusting the decimal value. To increase the value, we can use the INR instruction, but INR instruction does not affect the carry flag. So here we are ...

Read More

Program for subtraction of multi-byte BCD numbers in 8085 Microprocessor

Arnab Chakraborty
Arnab Chakraborty
Updated on 09-Oct-2019 593 Views

Here we will see one program that can perform subtraction for multi-byte BCD numbers using 8085 microprocessor.Problem Statement −Write an 8085 Assembly language program to subtract two multi-byte BCD numbers.Discussion −The numbers are stored into memory, and one additional information is stored. It will show us the byte count of the multi-byte BCD number. Here we are choosing 3-byte BCD numbers. They are stored at location 8001H to 8003H, and another number is stored at location 8004H to 8006H. The location 8000H is holding the byte count. In this case the byte count is 03H.For the subtraction we are using the 10’s ...

Read More

8085 program to alternate D0 bit with specified delay

Chandu yadav
Chandu yadav
Updated on 07-Oct-2019 435 Views

Now let us see a program of Intel 8085 Microprocessor. In this program we will see how to alternate the D0 bit and send as output.Problem StatementWrite 8085 Assembly language program to alternate D0 bit. And send this as output.DiscussionAlternating D0 bit and sending as output is like generating the square wave. We are adding extra delay in each phase. To generate square wave with 8085, we will rotate 10101010 (AAH) continuously, and send D0 as output. We will mask the accumulator content by 01H. If this is 0, then output will be 0, if it is 1, output will ...

Read More

Program to convert two-digit hex to two ASCII values in 8085 Microprocessor

Arnab Chakraborty
Arnab Chakraborty
Updated on 05-Oct-2019 701 Views

Here we will see a program of Intel 8085 Microprocessor. Using this program, we can convert 8-bit numbers to two digit ASCII values.Problem Statement− Write an 8085 Assembly language program to convert 8-bit binary to 2-character ASCII values. The 8-bit binary number is stored in memory location 8050H. Separate each nibbles and convert it to corresponding ASCII code and store it to the memory location 8060H and 8061H.Discussion−In this problem we are using a subroutine to convert one hexadecimal digit (nibble) to its equivalent ASCII values. As the 8-bit number contains two nibbles, so we can execute this subroutine to find ...

Read More

Program to convert ASCII to binary in 8085 Microprocessor

Arnab Chakraborty
Arnab Chakraborty
Updated on 05-Oct-2019 749 Views

Here we will see one 8085 program, the program will convert ASCII to binary values.Problem Statement− Write an 8085 Assembly level program to convert ASCII to binary or Hexadecimal character equivalent values.Discussion−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 will check whether the ASCII value is less ...

Read More

Program to alternately display 00 and FF in the data field in 8085 Microprocessor

Arnab Chakraborty
Arnab Chakraborty
Updated on 05-Oct-2019 766 Views

Here we will see one 8085 microprocessor program. This program will generate 00H and FFH alternatively.Problem Statement − Write an 8085 Assembly language program that can generate 00H and FFH alternatively.Discussion − The 00H and FFH are changed alternatively in each second. So we need one second delay. We have created delay subroutine to generate 1s delay.Note: Here for simplicity we are storing the numbers into memory. To show the numbers, we can use 7 – segment display and other display function for showing it into the display.InputHere we are not providing any input.Flow DiagramProgramAddressHEX CodesLabelsMnemonicsCommentsF000AFLOOPXRA AClear A registerF00132, 50, 80 STA 8050H  Store 00H ...

Read More

Comparison of I/O port chips and memory chips in 8085

Arnab Chakraborty
Arnab Chakraborty
Updated on 04-Oct-2019 412 Views

In this section we will see the basic comparisons between I/O port chips and the memory chips in 8085 microprocessor.Information is also stored in an Input Output port chip similar to a memory chip. Information of 1 byte are stored in an Input Output port chip on the other hand information of few bytes are stored in the Input Output port chips. An example to be cited as only 1 byte of information is stored in Intel 8212 I/O port chip, but 3 bytes of information are stored in Intel 8255 chip. Moreover, a large number of memory locations like ...

Read More

8086 program to determine subtraction of corresponding elements of two arrays

Smita Kapse
Smita Kapse
Updated on 30-Jul-2019 383 Views

In this program we will see how to subtract the contents of two different arrays.Problem StatementWrite 8086 Assembly language program to subtract the contents to corresponding elements which are stored in two different arraysDiscussionIn this example there are two different arrays. The arrays are stored at location 501 onwards and 601 onwards. The size of these two arrays are stored at offset location 500. We are taking the array size to initialize the counter, then by using loops we are subtracting the elements one by oneInputAddressData……5000450109502035030850406……60104602016030260403……Flow DiagramProgram    MOV SI,  500     ;Point Source index to 500     MOV CL,  [SI]    ;Load the ...

Read More

8085 program to count total odd numbers in series of 10 numbers

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 2K+ Views

In this program we will see how to count number of odd numbers in a block of elements.Problem StatementWrite 8085 Assembly language program to count number of odd numbers in a block of data, where the block size is 10D. The block is starting from location 8000H.DiscussionThe Odd Even checking is very simple. we can determine one number is odd or even by checking only the LSb. When LSb is 1, the number is odd, otherwise it is even. In this program we are taking a number from memory and then ANDing 01H with it. if the result is nonzero, ...

Read More
Showing 91–100 of 321 articles
« Prev 1 8 9 10 11 12 33 Next »
Advertisements