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

PIC12F617T-I/MS View Datasheet(PDF) - Microchip Technology

Part Name
Description
Manufacturer
PIC12F617T-I/MS
Microchip
Microchip Technology 
PIC12F617T-I/MS Datasheet PDF : 212 Pages
First Prev 21 22 23 24 25 26 27 28 29 30 Next Last
PIC12F609/615/617/12HV609/615
3.3 Reading the Flash Program
Memory
To read a program memory location, the user must
write two bytes of the address to the PMADRL and
PMADRH registers, and then set control bit RD
(PMCON1<0>). Once the read control bit is set, the
program memory Flash controller will use the second
instruction cycle after to read the data. This causes the
second instruction immediately following the “BSF
PMCON1,RD” instruction to be ignored. The data is
available in the very next cycle in the PMDATL and
PMDATH registers; it can be read as two bytes in the
following instructions. PMDATL and PMDATH regis-
ters will hold this value until another read or until it is
written to by the user (during a write operation).
EXAMPLE 3-1: FLASH PROGRAM READ
BANKSEL PM_ADR
MOVLW MS_PROG_PM_ADDR
MOVWF PMADRH
MOVLW LS_PROG_PM_ADDR
MOVWF PMADRL
BANKSEL PMCON1
BSF
PMCON1, RD
; Change STATUS bits RP1:0 to select bank with PMADRL
;
; MS Byte of Program Address to read
;
; LS Byte of Program Address to read
; Bank to containing PMCON1
; PM Read
NOP
; First instruction after BSF PMCON1,RD executes normally
NOP
BANKSEL PMDATL
MOVF PMDATL, W
MOVF PMDATH, W
; Any instructions here are ignored as program
; memory is read in second cycle after BSF PMCON1,RD
;
; Bank to containing PMADRL
; W = LS Byte of Program PMDATL
; W = MS Byte of Program PMDATL
DS41302D-page 30
2010 Microchip Technology Inc.

Share Link: 

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