| Electronic Components Datasheet Search |
|
PIC16LC771 Datasheet(PDF) 43 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16LC771 Datasheet(HTML) 43 Page - Microchip Technology |
|
43 / 224 page ![]() 1999-2013 Microchip Technology Inc. DS41120C-page 43 PIC16C717/770/771 4.3 READING THE EPROM PROGRAM MEMORY To read a program memory location, the user must write 2 bytes of the address to the PMADRH and PMADRL registers, then set control bit RD (PMCON1<0>). Once the read control bit is set, the Program Memory Read (PMR) 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 PMDATH and PMDATL registers; therefore it can be read as 2 bytes in the following instructions. PMDATH and PMDATL registers will hold this value until another Program Memory Read or until it is written to by the user. EXAMPLE 4-1: OTP PROGRAM MEMORY Read 4.4 OPERATION DURING CODE PROTECT When the device is code protected, the CPU can still perform the Program Memory Read function. FIGURE 4-1: PROGRAM MEMORY READ CYCLE EXECUTION Note: The two instructions that follow setting the PMCON1 read bit must be NOPs. BSF STATUS, RP1 ; BCF STATUS, RP0 ; Bank 2 MOVLW MS_PROG_PM_ADDR ; MOVWF PMADRH ; MS Byte of Program Memory Address to read MOVLW LS_PROG_PM_ADDR ; MOVWF PMADRL ; LS Byte of Program Memory Address to read BSF STATUS, RP0 ; Bank 3 BSF PMCON1, RD ; Program Memory Read NOP ; This instruction must be an NOP NOP ; This instruction must be an NOP next instruction ; PMDATH:PMDATL now has the data Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 BSF PMCON1,RD Executed here INSTR(PC+1) Executed here Forced NOP Executed here PC PC+1 PMADRH,PMADRL PC+3 PC+5 Program RD bit PC+3 PC+4 INSTR(PC-1) Executed here INSTR(PC+3) Executed here INSTR(PC+4) Executed here PMDATH PMDATL register Memory ADDR |
|
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 |