Qdatasheet_Logo
Integrated circuits, Transistor, Semiconductors Search and Datasheet PDF Download Site

PIC16LC84-10I/P View Datasheet(PDF) - Microchip Technology

Part Name
Description
MFG CO.
PIC16LC84-10I/P
Microchip
Microchip Technology Microchip
'PIC16LC84-10I/P' PDF : 110 Pages View PDF
PIC16C84
4.5 Indirect Addressing; INDF and FSR
Registers
The INDF register is not a physical register. Address-
ing INDF actually addresses the register whose
address is contained in the FSR register (FSR is a
pointer). This is indirect addressing.
EXAMPLE 4-1: INDIRECT ADDRESSING
• Register file 05 contains the value 10h
• Register file 06 contains the value 0Ah
• Load the value 05 into the FSR register
• A read of the INDF register will return the value of
10h
• Increment the value of the FSR register by one
(FSR = 06)
• A read of the INDF register now will return the
value of 0Ah.
FIGURE 4-7: DIRECT/INDIRECT ADDRESSING
RP1 RP0
Direct Addressing
6
from opcode
0
Reading INDF itself indirectly (FSR = 0) will produce
00h. Writing to the INDF register indirectly results in a
no-operation (although STATUS bits may be affected).
A simple program to clear RAM locations 20h-2Fh
using indirect addressing is shown in Example 4-2.
EXAMPLE 4-2: HOW TO CLEAR RAM
USING INDIRECT
ADDRESSING
NEXT
CONTINUE
movlw
movwf
clrf
incf
btfss
goto
:
0x20 ;initialize pointer
FSR ; to RAM
INDF ;clear INDF register
FSR ;inc pointer
FSR,4 ;all done?
NEXT ;NO, clear next
;YES, continue
Indirect Addressing
IRP
7
(FSR)
0
bank select location select
bank select
Data
Memory
00
00h
01
10
11
00h
not used not used
0Bh
0Ch
Addresses
map back
to Bank 0
2Fh
30h
7Fh
7Fh
Bank 0 Bank 1 Bank 2 Bank 3
location select
DS30445D-page 18
1996-2013 Microchip Technology Inc.
Share Link: GO URL

All Rights Reserved © qdatasheet.com  [ Privacy Policy ] [ Contact Us ]