0% found this document useful (0 votes)
112 views14 pages

Abhay Menon I15PH010

The document discusses different types of data transfer and addressing modes in 8051 microcontrollers. There are three main types of data transfer: MOV, POP, and PUSH. The four addressing modes are immediate, register, direct, and indirect. Indirect addressing uses registers R0 and R1 to hold the address being accessed rather than directly specifying the address.

Uploaded by

Abhay Menon A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views14 pages

Abhay Menon I15PH010

The document discusses different types of data transfer and addressing modes in 8051 microcontrollers. There are three main types of data transfer: MOV, POP, and PUSH. The four addressing modes are immediate, register, direct, and indirect. Indirect addressing uses registers R0 and R1 to hold the address being accessed rather than directly specifying the address.

Uploaded by

Abhay Menon A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Abhay Menon

I15PH010
• It only copies the data. The original is left untouched until further
instruction.

• There are three main types of data transfer:


1. MOV dest., source
2. POP dest., and PUSH source
3. XCH dest., source

• Ends up with 28 different mnemonics for data transfer


The way in which the source and destination of data is specified in te
mnemonic determines the addressing mode. There are four types of modes.

• Immediate addressing mode


• Register addressing mode
• DIrect addressing mode
• Indirect addressing mode

These modes are used to transfer data to and from the memory, which is split
into four distinct types, viz a viz, Internal RAM, Internal Special Function
Registers, External RAM, and Internal and External ROM
• The source of the data is part of the op-code.

• The data source is immediately available as part of the instruction itself.

• The program counter is automatically incremented to point to the bye


following the op-code byte. When data is found, it is copied to the
register or address in question.

• The mnemonic for Immediate data transfer, is the pound sign (#).

• It is impossible to have immediate data as destination.


Rr can be anything from R0 to R7
• Certain registers may be used as a part of opcode mnemonics as sources or
destination of data.

• Registers A, DPTR, R0 to R7 may be named as part of the opcode mnemonic.

• All register addressing mode instructions are one-byte instructions.

• One of the operand must be accumulator and other operand is any register
R0—R7. Both the operands can’t be registers. i.e., MOV R0, R4 is not a valid
instruction
• All 128-bytes of internal RAM and the SFR may be addressed directly using
one byte addresses assigned to them.

• Internal RAM uses addresses from 00H to 7FH. SFR uses the addresses
ranging from 80H to FFH at specified locations.

• 00H to 1FH are the locations assigned to the 4 banks of the 8 working
registers. Hence, for example. R2 of register bank 0 can be accessed
through the address 02H.

• Be sure to set SP to a number above those of any working register that may
be in use. Else, it will lead to error, as S.P grows upwards, and overwrites
the content in the register banks.
• PSW contains 2 bank selector bits, RS0 and RS1.

• Their combination determines what bank is used.

• When 8051 is reset, RS0 and RS1 are both reset


to 00B. This activates bank 0. Also, the SP is set
to 07H.
• Indirect addressing mode uses a register to hold the actual address that
will finally be used in the data move.

• The register itself is not the address, but rather the number in the register.

• It uses R0 and R1, often called data pointers.

• The address could be RAM or an SFR address.

• The mnemonic symbol used here is '@'.

You might also like