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

PIC16LF723A-I/ML データシートの表示(PDF) - Microchip Technology

部品番号
コンポーネント説明
メーカー
PIC16LF723A-I/ML Datasheet PDF : 284 Pages
First Prev 171 172 173 174 175 176 177 178 179 180 Next Last
PIC16F/LF722A/723A
18.0 PROGRAM MEMORY READ
The Flash program memory is readable during normal
operation over the full VDD range of the device. To read
data from program memory, five Special Function
Registers (SFRs) are used:
• PMCON1
• PMDATL
• PMDATH
• PMADRL
• PMADRH
The value written to the PMADRH:PMADRL register
pair determines which program memory location is
read. The read operation will be initiated by setting the
RD bit of the PMCON1 register. The program memory
Flash controller takes two instructions to complete the
read. As a consequence, after the RD bit has been set,
the next two instructions will be ignored. To avoid
conflict with program execution, it is recommended that
the two instructions following the setting of the RD bit
are NOP. When the read completes, the result is placed
in the PMDATLH:PMDATL register pair. Refer to
Example 18-1 for sample code.
Note:
Code-protect does not effect the CPU
from performing a read operation on the
program memory. For more information,
refer to Section 8.2 “Code Protection”
EXAMPLE 18-1: PROGRAM MEMORY READ
BANKSEL PMADRL ;
MOVF MS_PROG_ADDR, W;
MOVWF PMADRH ;MS Byte of Program Address to read
MOVF LS_PROG_ADDR, W;
MOVWF PMADRL ;LS Byte of Program Address to read
BANKSEL PMCON1 ;
BSF
PMCON1, RD;Initiate Read
NOP
NOP
;Any instructions here are ignored as program
;memory is read in second cycle after BSF
BANKSEL PMDATL ;
MOVF PMDATL, W;W = LS Byte of Program Memory Read
MOVWF LOWPMBYTE;
MOVF PMDATH, W;W = MS Byte of Program Memory Read
MOVWF HIGHPMBYTE;
2010 Microchip Technology Inc.
DS41417A-page 177

Share Link: 

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