Ankith Reddy

Ankith Reddy

730 Articles Published

Articles by Ankith Reddy

Page 38 of 73

Execution of 'DAD rp' instruction

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

In 8085 Instruction set, for 16-bit addition, there is one instruction available that is DAD rp instruction. It is a 1-Byte instruction. With this instruction, with the content of the HL register pair, the contents of the mentioned register pair will get added and the result thus produced will be stored on the HL register pair.Mnemonics, OperandOpcode(in HEX)BytesDAD B091DAD D191DAD H291DAD SP391As an example, let us consider the execution of the DADB instruction. Let us suppose, that the initial content of HL register pair is 5050H and content of BC register pair is 4050H. So now if we execute instruction ...

Read More

AD7-0 pins in 8085 Microprocessor

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

The Intel 8085 is an 8-bit microprocessor produced by Intel and introduced in 1976. It is a software-binary compatible with the more-famous Intel 8080 with only two minor instructions added to support its added interrupt and serial input/output features. When the 8085desires to receive 8-bit information, it receives it on these eight pins AD7, AD6, …, AD0. These eight pins are collectively called AD7-0. They are called basically “Address Data”. When the 8085 desires to send out 8-bit information, it sends it out on these same pins. these pins are bi-directional pins.The same lines are used for both receiving information and ...

Read More

2's complement notation

Ankith Reddy
Ankith Reddy
Updated on 27-Jun-2020 5K+ 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 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, the other bits signify the 2'scomplement of the magnitude of the number.Thus a positive number has the same representation in SM, 1's complement, and 2's complement notations. Only negative numbers are represented ...

Read More

Programmer's view of 8051

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

Now let us see the internal registers, memory and other details from the Programmer’s point of view.There are these componentsEight registers(8-bit) R0 to R7Register A and B.These are also 8-bit registersPSW, Stack Pointer(SP), four ports (P0 to P3). These are also 8-bitDPTR register of 16-bit. This is divided into two 8-bit registers, these are DPH and DPLData RAM from location 08H to 7FHProgram memory from location 0000H to FFFFHProgram Counter (PC) of 16-bit

Read More

Arithmetic group in 8051

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

In 8051 Microcontroller there are 24 different instructions under the Arithmetic Group. In total there are 64 opcodes. The Carry Flag (CY), Auxiliary Carry (AC)and Overflow flag (OV) are affected based on the result of ADD, ADDC, SUBB  etc. instructions. The multiple and divide instructions clear the Carry flag, and also does not affect the AC flag. After execution of multiplication, the OV flag will be 1 when the result is greater than FFH. Otherwise, it is 0. Similarly, after division OV flag is 1 when the content of B is 00H before division, otherwise it is 0. The DA ...

Read More

Unsigned binary integers

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

Unsigned binary integers are numbers without any ‘+’or ‘-’ sign. Here all bits representing the number will represent the magnitude part of the number only. No bits will remain reserved for sign bit representation. An unsigned binary integer is a fixed-point system with no fractional digits.Some real life Examples are −Number of tables in a class, The number of a member of a family.Obviously, they are unsigned integers like 10 and 5. These numbers have to be represented in a computer using only binary notation or using bits.Numbers are represented in a computer using a fixed size, like 4, 8, ...

Read More

Shift a multi-byte BCD number to the right in 8051

Ankith Reddy
Ankith Reddy
Updated on 27-Jun-2020 445 Views

Here we will see a problem to shift some multi-byte BCD number to the right. The BCD numbers are shifted by two digits (8-bit). Let us consider a four-byte BCD number (45 86 02 78) is stored at location 20H, 21H, 22H, 23H. The address 10H holds the number of bytes of the whole BCD number. So after executing this code, the contents will be shifted to the right and 20H will hold 00H.AddressValue...20H4521H8622H0223H78...Program        CLRA;Clear the Register A         MOVR2, 10H;TakeByte Count         INCR2;Increase R2 for loop         MOVR1, ...

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

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

SIM instruction in 8085

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

In 8085 Instruction set, SIM stands for “SetInterrupt Mask”. It is 1-Byte instruction and it is a multi-purpose instruction. The main uses of SIM instruction are –Masking/unmasking of RST7.5, RST6.5, and RST5.5Reset to 0 RST7.5 flip-flopPerform serial output of dataMnemonics, OperandOpcode(in HEX)BytesSIM301When SIM instruction is executed then the content of theAccumulator decides the action to be taken. So before executing the SIM instruction, it is mandatory to initialize Accumulator with the required value. The meaning and purpose of the various bits of the accumulator when SIM is executed has been depicted below – Note that except bit 5, which is a ...

Read More
Showing 371–380 of 730 articles
« Prev 1 36 37 38 39 40 73 Next »
Advertisements