| Electronic Components Datasheet Search |
|
PIC16F722-E/ML Datasheet(PDF) 189 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16F722-E/ML Datasheet(HTML) 189 Page - Microchip Technology |
|
189 / 302 page ![]() © 2009 Microchip Technology Inc. DS41341E-page 189 PIC16F72X/PIC16LF72X 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, causing the second instruction after the setting the RD bit will be ignored. To avoid conflict with pro- gram execution, it is recommended that the two instruc- tions 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. EXAMPLE 18-1: PROGRAM MEMORY READ 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” 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 ; |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |