Hi I spent awhile battling with the conversion to 18F. Below is some code to read a block of onboard EE into ram. I'm not going to format the text, but it does work fine. Hopefully it's of help. Regards Roland By the way; b0 equ 0x00 ;ram bank 0 It was easier to read this way. At 12:57 PM 19/07/2005 -0500, you wrote: >I ported my code (F872 to F242), which required some time/thought since I had >some "interesting" pieces of code in there. Most everything works now, >except that I have a problem with EEPROM code. It's not reading defaults >that are programmed at startup. But if anything is written to EE during code >execution, it reads that back fine. Is the location still 0x2100? Or is >there something else I need to do here? I'm still going thru the manuals, >but need a break from that. > >Cheers, >-Neil. > > copyin ;copy EE values into ram, block copy movlw 0x01 movwf FSR0H,b0 ;in bank1 movlw 0x00 ;start at 0100 movwf eread,b0 clrf epos,b0 egain movf epos,w,b0 movwf EEADR,b0 bcf EECON1,EEPGD,b0 bcf EECON1,CFGS,b0 ;big fuckup, was missing 17/3/5 bsf EECON1,RD,b0 movf EEDATA,w,b0 movwf egot,b0 movf eread,w,b0 movwf FSR0L,b0 movlw 0x01 movwf FSR0H,b0 ;in bank1 ;copied from above; 14/3/5 movf egot,w,b0 movwf INDF0,b0 incf epos,f,b0 incf eread,f,b0 movf eread,w,b0 xorlw 0x28 ;end at position 27, incl stata at 27 containing smoke(7) flag btfss _Z,b0 ;done the block move bra egain ;modified end position, 30 to 27, on 9/3/5 Regards Roland Jollivet -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist