English
Language : 

PIC18F2331_10 Datasheet, PDF (77/392 Pages) Microchip Technology – 28/40/44-Pin Enhanced Flash Microcontrollers with nanoWatt Technology, High-Performance PWM and A/D
PIC18F2331/2431/4331/4431
The PLUSW register can be used to implement a form
of Indexed Addressing in the data memory space. By
manipulating the value in the W register, users can
reach addresses that are fixed offsets from pointer
addresses. In some applications, this can be used to
implement some powerful program control structure,
such as software stacks, inside of data memory.
6.7.3.3 Operations by FSRs on FSRs
Indirect Addressing operations that target other FSRs or
virtual registers represent special cases. For example,
using an FSR to point to one of the virtual registers will
not result in successful operations. As a specific case,
assume that FSR0H:FSR0L contain FE7h, the address
of INDF1. Attempts to read the value of the INDF1 using
INDF0 as an operand will return 00h. Attempts to write
to INDF1 using INDF0 as the operand will result in a NOP.
On the other hand, using the virtual registers to write to
an FSR pair may not occur as planned. In these cases,
the value will be written to the FSR pair but without any
incrementing or decrementing. Thus, writing to INDF2
or POSTDEC2 will write the same value to the
FSR2H:FSR2L.
Since the FSRs are physical registers mapped in the
SFR space, they can be manipulated through all direct
operations. Users should proceed cautiously when
working on these registers, particularly if their code
uses Indirect Addressing.
Similarly, operations by Indirect Addressing are gener-
ally permitted on all other SFRs. Users should exercise
the appropriate caution that they do not inadvertently
change settings that might affect the operation of the
device.
 2010 Microchip Technology Inc.
DS39616D-page 77