EEPROM Access

Problem:
The registers that are used to access the EEPROM area of the PIC chip varies between chip types.

Solution:
Firstly, it should be noted that some chip types do not have any EEPROM. Then, for those chips that do have EEPROM, the registers that access it varies. For example, the 16F84 uses registers 08 and 09 whereas the 16F872 uses registers 0C and 0D.
This means that listing 2.12 on page 25 would not work. To make it work, change lines 8 and 9 from:
BCF 0x08, 7
BSF 0x08, 2
to
BCF 0x0C, 7
BSF 0x0C, 2

Similar errors exist in listing 2.14
Line 5 should read MOVF 0x21, W
Lines 23 and 25 should refer to register 0x0C instead of 0x08.

Further information:
I hope that this page helps you with your projects but if you have found any other problems or if you have any further questions please contact me though the email address of gares-AT-g4aym-DOT-org-DOT-uk.

Sorry about the email address but it seems to be the only way to avoid the spammers



Click here to return to the PIC Basics Main Page

Click here for the Index of Errors and Ommissions