> In that piece of code, setting up for a write, eeadr and eedata > are loaded AFTER the bank has been changed to bank1 > > BSF STATUS,RP0 > MOVLW CONFIG_ADDR > MOVWF EEADR > MOVLW CONFIG_DATA > MOVWF EEDATA > > BSF EECON1,WREN > > In the routine I'm working on, that doesn't produce the correct > result because the data and address indices aren't in bank1 CONFIG_ADDR and CONFIG_DATA are literal values (because of MOVLW instruction) so example is correct. On a 16F628 EEADR and EEDATA are in bank 1. If you are trying to load values from ram locations defined in bank0 you need to do something like this BCF STATUS,RP0 ;bank 0 MOVF BANK0ADDRESS,W ;address from bank 0 into w BSF STATUS,RP0 ;bank 1 MOVWF EEADR BCF STATUS,RP0 ;back to bank 0 MOVF BANK0DATA,W ;data from bank 0 into w BSF STATUS,RP0 ;bank 1 again ! MOVWF EEDATA BSF EECON1,WREN etc... You could save some bank switching by using the FSR register to access one of the bank0 values James -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics