Read Mode in EEPROM

Electrically Erasable Programmable Read Only Memory (EEPROM) is a type of memory that are used for storing small data that must be saved when the power is removed. It can be erased and programmed in the circuit. EEPROMS are used for configuration information.

Here is the assembly code for setting the EEPROM in read mode.

BSF STATUS,RPI
BCF STATUS,RP0           ;Bank 2
MOVF ADDR,W              ;Write Address
MOVWF EEADR            ; to read from 
BSF STATUS,RP0           ;bank 3
BCF EECON1,EEPGD   ;point to data memory
BSF EECON1,RD           ;start read
BCF STATUS,RP0          ;bank 2
MOVF EEDATA,W        ;w - EEDATA
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s