| Electronic Components Datasheet Search |
|
PIC16C770-04/P Datasheet(PDF) 45 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16C770-04/P Datasheet(HTML) 45 Page - Microchip Technology |
|
45 / 200 page ![]() PIC16C717/770/771 © 1999 Microchip Technology Inc. Advanced Information DS41120A-page 45 4.0.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 read or until it is written to by the user. EXAMPLE 4-1: OTP PROGRAM MEMORY READ 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 is executed NOP ; This instruction must be a NOP next instruction ; PMDATH:PMDATL now has the data 4.0.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 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 |