PIC16C56A Microchip Technology Inc., PIC16C56A Datasheet - Page 35

no-image

PIC16C56A

Manufacturer Part Number
PIC16C56A
Description
Eprom/rom-based 8-bit Cmos Microcontroller Series
Manufacturer
Microchip Technology Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16C56A
Manufacturer:
MICROCHI
Quantity:
100
Part Number:
PIC16C56A-04/P
Manufacturer:
Microchip
Quantity:
2 190
Part Number:
PIC16C56A-04/P
Manufacturer:
Microchip Technology
Quantity:
135
Part Number:
PIC16C56A-04/P
Manufacturer:
M
Quantity:
20 000
Part Number:
PIC16C56A-04/SO
Manufacturer:
MICROC
Quantity:
650
Part Number:
PIC16C56A-04/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16C56A-20/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16C56A/JW
Manufacturer:
Microchip Technology
Quantity:
2
Part Number:
PIC16C56AT-04I/SO
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
6.7
The INDF Register is not a physical register.
Addressing INDF actually addresses the register
whose address is contained in the FSR Register (FSR
is a pointer ). This is indirect addressing.
EXAMPLE 6-1:
• Register file 08 contains the value 10h
• Register file 09 contains the value 0Ah
• Load the value 08 into the FSR Register
• A read of the INDF Register will return the value
• Increment the value of the FSR Register by one
• A read of the INDF register now will return the
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 10h-1Fh
using indirect addressing is shown in Example 6-2.
FIGURE 6-10:
bank select
of 10h
(FSR = 09h)
value of 0Ah.
2002 Microchip Technology Inc.
Note 1: For register map detail see Section 6.2.
(FSR)
6
5
Indirect Data Addressing; INDF
and FSR Registers
Direct Addressing
location select
Data
Memory
4
INDIRECT ADDRESSING
DIRECT/INDIRECT ADDRESSING
3
(opcode)
(1)
2
1Fh
00h
0Fh
10h
1
0
Bank 0
00
3Fh
Bank 1
01
Preliminary
Addresses map back to
addresses in Bank 0.
5Fh
Bank 2
10
EXAMPLE 6-2:
NEXT
CONTINUE
The FSR is either a 5-bit (PIC16C54, PIC16CR54,
PIC16C55,
(PIC16C57, PIC16CR57, PIC16C58, PIC16CR58)
wide register. It is used in conjunction with the INDF
Register to indirectly address the data memory area.
The FSR<4:0> bits are used to select data memory
addresses 00h to 1Fh.
PIC16C54,
PIC16CR56: These do not use banking. FSR<6:5> bits
are unimplemented and read as '1's.
PIC16C57, PIC16CR57, PIC16C58, PIC16CR58:
FSR<6:5> are the bank select bits and are used to
select the bank to be addressed (00 = bank 0,
01 = bank 1, 10 = bank 2, 11 = bank 3).
7Fh
Bank 3
11
MOVLW
MOVWF
CLRF
INCF
BTFSC
GOTO
:
PIC16CR54,
PIC16C56,
HOW TO CLEAR RAM
USING INDIRECT
ADDRESSING
H’10’
FSR
INDF
FSR,F
FSR,4
NEXT
6
Indirect Addressing
PIC16C5X
bank
PIC16CR56)
5
PIC16C55,
;initialize pointer
; to RAM
;clear INDF Register
;inc pointer
;all done?
;NO, clear next
;YES, continue
4
(FSR)
3
DS30453D-page 33
location select
2
PIC16C56,
1
or
0
7-bit

Related parts for PIC16C56A