BCF STATUS, RP0 ; Bank0 MOVLW CONFIG_ADDR ; Any location in Data EEPROM memory space MOVWF EEADR ; Address to read BSF STATUS, RP0 ; Bank1 BSF EECON1, RD ; EE Read BCF STATUS, RP0 ; Bank0 MOVF EEDATA, W ; W = EEDATA |
BSF STATUS, RP0 ; Bank1 BCF INTCON, GIE ; Disable INTs . BSF EECON1, WREN ; Enable Write 必须按照 MOVLW 55h ; 这个顺序 MOVWF EECON2 ; 55h must be written to EECON2 MOVLW AAh ; to start write sequence MOVWF EECON2 ; Write AAh BSF EECON1,WR ; Set WR bit begin write BSF INTCON, GIE ; Enable INTs. |
欢迎光临 英锐恩单片机论坛,Microchip单片机,模拟器件,接口电路,麦肯单片机,单片机应用交流 (http://enroobbs.com/) | Powered by Discuz! X3.2 |