up: microprocessors - microchip 16F84A - data memory  
Microchip 16F84A
EEPROM
What links here?

Reading EEPROM DATA

        BCF     STATUS, RP0         ; Bank 0
        MOVLW   CONFIG_ADDR         ;
        MOVWF   EEADR               ; Address to read
        BSF     STATUS, RP0         ; Bank 1
        BSF     EECON1, RD          ; EE Read
        BCF     STATUS, RP0         ; Bank 0
        MOVF    EEDATA, W           ; W = EEDATA

Writing EEPROM DATA

        BSF     STATUS, RP0         ; Bank 1
        BCF     INTCON, GIE         ; Disable INTs.
        BSF     EECON1, WREN        ; Enable Writes
        
        ; the following steps must be performed in the order shown without interuption
        MOVLW   55h                 ;
        MOVWF   EECON2              ; Write 55h
        MOVLW   AAh                 ;
        MOVWF   EECON2              ; Write AAh
        BSF     EECON1,WR           ; Set WR bit
        ; write begins
        BCF     EECON1, WREN        ; Disable writes
        BSF     INTCON, GIE         ; Enable INTs.


Verifing EEPROM DATA

        BCF STATUS,RP0              ; Bank 0
        :                           ; Any code
        :                           ; can go here
        MOVF EEDATA,W               ; Must be in Bank 0
        BSF STATUS,RP0              ; Bank 1
READ
        BSF EECON1, RD              ; YES, Read the value written
        BCF STATUS, RP0             ; Bank 0
                                    ;
                                    ; Is the value written
                                    ; (in W reg) and
                                    ; read (in EEDATA)
                                    ; the same?
                                    ;
        SUBWF EEDATA, W             ;
        BTFSS STATUS, Z             ; Is difference 0?
        GOTO WRITE_ERR              ; NO, Write error
microprocessors - microchip 16F84A - eeprom
Topical Bible - Book of Life
Topical Bible - Great White Throne
MC6802 - instruction set - memory
MC6802 - instruction set - Copy stack pointer to Index Register
Topical Bible - God's character
microprocessors - microchip 16F84A - intcon register
Topical Bible - Why Christ was born when He was
Topical Bible - from God
Topical Bible - Jesus, the only way to God
Topical Bible - redeemed
programming - C - function _splitpath
Topical Bible - Hell
Topical Bible - Man's condition prior to salvation
filename:microprocessors - microchip 16F84A - eeprom
filename:microprocessors%20%2D%20microchip%2016F84A%20%2D%20eeprom
last edit:June 02 2011 21:37:18 (4733 days ago)
ct = 1716064017.000000 = May 18 2024 16:26:57
ft = 1307065038.000000 = June 02 2011 21:37:18
dt = 408998979.000000