>What I did find was I had to set the page bits back to 00 else it would go >off >to never never land. Strange the notes didnt mention it. The bank bits (not PAGE bits) shouldn't matter AFTER you access the EEPROM memory. (Just as a note, the page bits (PCLATH) are set when you do your call and restored on return. Each page of these devices are 0xFF in length. Typically the page bits in PCLATH are manipulated when you modify the program counter PCL, as in the case of a computed goto. Otherwise, you really don't have to worry about PCLATH much.) Of course, whatever you access after you return will have to have the bank bits set appropriately. You don't have to reset the selected bank to 0 before you return, you can do it afterwards. This shouldn't have caused any errors with this routine. >TESTRD: > movf EEPROM_ADR,W ;0x00 > bcf STATUS,RP0 ; change to page 2 > bsf STATUS,RP1 ; change to page 2 > > movwf EEADR ; set up eeprom address from W > bsf STATUS,RP0 ; change to page 3 > bcf EECON1,EEPGD ; Be sure to read from EEPROM > bsf EECON1,RD ; set the read bit > bcf STATUS,RP0 ; back to page 2 > movf EEDATA,W ; return value in W > movwf EEPROM_DATA ; and store > bcf STATUS,RP0 ; change to page 0 > bcf STATUS,RP1 ; change to page 0 > return _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.