| Electronic Components Datasheet Search |
|
PIC16F87 Datasheet(PDF) 33 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16F87 Datasheet(HTML) 33 Page - Microchip Technology |
|
33 / 214 page ![]() 2003 Microchip Technology Inc. Preliminary DS30487B-page 31 PIC16F87/88 EXAMPLE 3-4: ERASING A FLASH PROGRAM MEMORY ROW BANKSEL EEADRH ; Select Bank of EEADRH MOVF ADDRH, W ; MOVWF EEADRH ; MS Byte of Program Address to Erase MOVF ADDRL, W ; MOVWF EEADR ; LS Byte of Program Address to Erase ERASE_ROW BANKSEL EECON1 ; Select Bank of EECON1 BSF EECON1, EEPGD ; Point to PROGRAM memory BSF EECON1, WREN ; Enable Write to memory BSF EECON1, FREE ; Enable Row Erase operation ; BCF INTCON, GIE ; Disable interrupts (if using) MOVLW 55h ; MOVWF EECON2 ; Write 55h MOVLW AAh ; MOVWF EECON2 ; Write AAh BSF EECON1, WR ; Start Erase (CPU stall) NOP ; Any instructions here are ignored as processor ; halts to begin Erase sequence NOP ; processor will stop here and wait for Erase complete ; after Erase processor continues with 3rd instruction BCF EECON1, WREN ; Disable writes BSF INTCON, GIE ; Enable interrupts (if using) |
|
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 |