Loading...
Pic Programming

Reading From EEPROM Memory

 

Setting the RD bit initializes transfer of data from address found in EEADR register to EEDATA register. As in reading data we don't need so much time as in writing, data taken over from EEDATA register can already be used further in the next instruction.

Sample of the part of a program which reads data in EEPROM, could look something like the following:

bcf STATUS, RP0 ;bankO, because EEADR is at 09h
movlw 0x00   ;address of location being read
movwf EEADR   ;address transferred to EEADR
bsf STATUS, RP0 ;bankl because EECON1 is at 88h
bsf EECON1, RD ;reading from EEFROM
bcf STATUS, RP0 ;Bank0 because EEDATA is at 08h
movf EEDATA W ;W< -- EEDATA

After the last program instruction, contents from an EEPROM address zero can be found in working register w.


Keywords : Pic, Assembler, Assembly, Reading, From, EEPROM, Memory
Writer : delon  |
3 Mar 2006 Fri   
|  4.220 Views
No Comments
Write Comment
Your Name
Email
You are writing as anonymous comment, if you are a member please login.