8085 Articles

Page 8 of 36

BCD to binary conversion in 8051

Chandu yadav
Chandu yadav
Updated on 27-Jun-2020 4K+ Views

In this problem, we will see how to convert 8-bit BCD number to its Binary (Hexadecimal)equivalent. The BCD number is stored at location 20H. After converting, the results will be stored at 30H.So let us assume the data is D5H. The program converts the binary value ofD5H to BCD value 213D.AddressValue...20H9421H...Program   MOVR0, #20H; Initialize the address of the data    MOVA, @R0;Get the data from an address, which is stored in R0    MOVR2, A; Store the content of A into R2        CLRA;Clear the content of A to 00H    MOVR3, #00H LOOP:   ADDA, #01H;increment A ...

Read More

Hex to ASCII conversion in 8051

Arjun Thakur
Arjun Thakur
Updated on 27-Jun-2020 6K+ Views

Now we will see how to convert Hexadecimal number to its ASCII equivalent using 8051. This program can convert 0-9 and A-F to its ASCII value. We 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) are in the range 41H to 46H.Here we are providing hexadecimal digit at memory location 20H, The ASCII equivalent is storing at location 30H.AddressValue...20H0EH21H...ProgramMOVR0, ...

Read More

Bit manipulation program in 8051

Ankith Reddy
Ankith Reddy
Updated on 27-Jun-2020 6K+ Views

In this section, we will see some bit manipulation operation using 8051. The 8051 supports some operations on different bits of an 8-bit number. The operations are like complementing, setting to 1, moving, ANDing, ORing etc.In this example, we are taking a number AEH from location 10H, then after performing following bit related operations on that data, we are just storing the result at location 30H.The bit related operations that will be performed on that data, are as follows −Complement bit b2Move b5to b4OR b0and complement of b1 and store to C (b7)Set b6Reset bit b3Input is AEHBitPositionb7b6b5b4b3b2b1b0Value10101110OutputBitPositionb7b6b5b4b3b2b1b0Value01110010The output will be ...

Read More

1's complement notation

Arjun Thakur
Arjun Thakur
Updated on 27-Jun-2020 6K+ Views

This is one of the methods of representing signed integers in the computer. In this method, the most significant digit (MSD) takes on extra meaning.If the MSD is a 0, we can evaluate the number just as we would interpret any normal unsigned integer.If the MSD is a 1, this indicates that the number is negative.The other bits indicate the magnitude (absolute value) of the number.If the number is negative, then the other bits signify the 1's complement of the magnitude of the number.Some signed decimal numbers and their equivalent in 1's complement notations are shown below, assuming a word ...

Read More

8051 Program to Subtract two 8 Bit numbers

Arjun Thakur
Arjun Thakur
Updated on 27-Jun-2020 14K+ Views

Here we will see how to subtract two 8-bit numbers using this microcontroller. The register A(Accumulator) is used as one operand in the operations. There are seven registers R0 – R7 in different register banks. We can use any of them as the second operand.We are taking two number73H and BDH at location 20H and 21H, After subtracting the result will be stored at location 30H and 31H.  AddressValue...20H73H21HBDH...30H00H31H00H...ProgramMOVR0, #20H;set source address 20H to R0 MOVR1, #30H;set destination address 30H to R1 MOVA, @R0;take the value from source to register A MOVR5, A; Move the value from A to ...

Read More

8051 Program to Multiply two 8 Bit numbers

Ankith Reddy
Ankith Reddy
Updated on 27-Jun-2020 23K+ Views

Now we will try to multiply two 8-bit numbers using this 8051 microcontroller. The register A and B will be used for multiplication. No other registers can be used for multiplication. The result of the multiplication may exceed the 8-bit size. So the higher order byte is stored at register B, and lower order byte will be in the Accumulator A after multiplication.We are taking two number FFH and FFH at location 20H and 21H, After multiplying the result will be stored at location 30H and 31H.  AddressValue...20HFFH21HFFH...30H00H31H00H...Program        MOV R0, #20H;set source address 20H to R0   ...

Read More

8051 Program to Divide two 8 Bit numbers

George John
George John
Updated on 27-Jun-2020 12K+ Views

Now we will see another arithmetic operation. The divide operation to divide two 8-bit numbers using this 8051 microcontroller. The register A and B will be used in this operation. No other registers can be used for division. The result of the division has two parts. The quotient part and the remainder part. Register A will hold Quotient, and register B will hold Remainder.We are taking two number0EH and 03H at location 20H and 21H, After dividing the result will be stored at location 30H and 31H.  AddressValue...20H0EH21H03H...30H00H31H00H...ProgramMOV R0, #20H;set source address 20H to R0 MOV R1, #30H;set destination address ...

Read More

Interfacing 8279 Keyboard with 8085 Microprocessor

Chandu yadav
Chandu yadav
Updated on 27-Jun-2020 3K+ Views

Here we will see how 8279 Chip can be used to interface a matrix keyboard with 8085 microprocessors. This chip can be used either keyboard/display interfacing mode or as a strobed input port. But generally, it is used as keyboard interfacing.The keyboard interfacing schemes can also be divided into two modes. These modes are Decoded mode of operationEncoded mode of operationDecoded Mode of OperationIn this mode, the matrix keyboard can have only four rows. These four rows can be selected by using SL3-0 select lines. There are eight columns. These can be selected using RL7-0 these eight column lines. So there are ...

Read More

Interfacing 8279 Display with 8085 Microprocessor

George John
George John
Updated on 27-Jun-2020 4K+ Views

The Intel 8279 is used for keyboard interfacing but it can also be used for multiplexed 7-segment LED display interfacing. To display a character into 7-segment display we have to store 7-segment code in a display RAM location. The display RAM of this chip can store 16 bytes of data.Write to Display RAMTo write to the display RAM one special command is needed to be applied on the 8279 control port. The following pattern is showing the RAM command that is written to the control port of 8279.100AiAAAAThe first three bits are 100. It indicates ‘ Write to Display RAM’command. ...

Read More

Interrupt handing in 8051

Arjun Thakur
Arjun Thakur
Updated on 27-Jun-2020 1K+ Views

As we have seen there are five different interrupts in 8051. These interrupts are INT0, INT1, TO, T1, TI/RI.There are six states in each machine cycle. These states are S1 to S6. All of the interrupts are sampled at the end of state S5 of each machine cycle. When the instruction takes more than one machine cycle, then the samples are polled during the next machine cycle. When an interrupt flag is set at the S5 of the first machine cycle, then the polling cycle will find it. The interrupt system generates LCALL instruction to call appropriate ISS.There are some ...

Read More
Showing 71–80 of 357 articles
« Prev 1 6 7 8 9 10 36 Next »
Advertisements