Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Explanation needed in indirect addressing mode of pic16f877a

Status
Not open for further replies.

rangerskm

Full Member level 4
Joined
Jan 23, 2013
Messages
199
Helped
0
Reputation
2
Reaction score
0
Trophy points
1,296
Activity points
2,663
1) explain what is indirect addressing mode in pic
2) explain the registers INDF IRP FSR
3)why we are using indirect addressing mode ,say an example for that
thanking you in advance
 

1) explain what is indirect addressing mode in pic
2) explain the registers INDF IRP FSR
3)why we are using indirect addressing mode ,say an example for that
thanking you in advance


Hi,

Sounds like questions from your tutor ?

Simply put, you normally let the pic system automatically do the addressing for you; you just give the variable a name and it stores and retrieves it for you.

Indirect addressing is where you tell the system exactly what memory location to go to.

Register indirect addressing is used to access any location in data memory by treating the con-
tents of a working register as an effective address (EA) to data memory. Essentially, the contents
of the working register become a pointer to the location in data memory which is to be accessed
by the instruction.
This addressing mode is powerful, because it also allows one to modify the contents of the work-
ing register either before or after the data access is made, by incrementing or decrementing the
EA. By modifying the EA in the same cycle that an operation is being performed, register indirect
addressing allows for the efficient processing of data that is stored sequentially in memory.

See this link page 11; **broken link removed**
 
FSR is the file select register. You can load the address of any register to FSR.
when you modify the INDF register, it will indirectly affect the register whose address is loaded in the FSR
Eg:
movlw PORTB
movwf FSR
clrf INDF

The above code will clear PORTB
 

this means that we are loading the address of PORTB in FSR REG and modifying by using INDF isnt ??
 

The value you loaded to FSR will point the register address in the data memory like Program counter ( PC ) point the program memory location

1.You can collect the date from INDF which you pointed by FSR
2.By clearing the INDF register, in the same time clear the register that pointed by FSR last
 
Last edited:
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top