DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

PIC16F1503 查看數據表(PDF) - Microchip Technology

零件编号
产品描述 (功能)
生产厂家
PIC16F1503
Microchip
Microchip Technology Microchip
PIC16F1503 Datasheet PDF : 352 Pages
First Prev 11 12 13 14 15 16 17 18 19 20 Next Last
3.2.1.2 Indirect Read with FSR
The program memory can be accessed as data by set-
ting bit 7 of the FSRxH register and reading the match-
ing INDFx register. The MOVIW instruction will place the
lower eight bits of the addressed word in the W register.
Writes to the program memory cannot be performed via
the INDF registers. Instructions that access the pro-
gram memory via the FSR require one extra instruction
cycle to complete. Example 3-2 demonstrates access-
ing the program memory via an FSR.
The HIGH operator will set bit<7> if a label points to a
location in program memory.
EXAMPLE 3-2:
ACCESSING PROGRAM
MEMORY VIA FSR
constants
DW DATA0
;First constant
DW DATA1
;Second constant
DW DATA2
DW DATA3
my_function
;… LOTS OF CODE…
MOVLW DATA_INDEX
ADDLW LOW constants
MOVWF FSR1L
MOVLW HIGH constants;MSb sets
automatically
MOVWF FSR1H
BTFSC STATUS, C
;carry from ADDLW?
INCF FSR1h, f
;yes
MOVIW 0[FSR1]
;THE PROGRAM MEMORY IS IN W
PIC16(L)F1503
2011-2015 Microchip Technology Inc.
DS40001607D-page 15

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]