Dont Know what I was thinking. (Too many dusk til dawn sessions) I found out I need to do a TBLRD*- after the erase then skip the new loading of the address pointers. this solved the problem. ----- Original Message ----- From: "Michael Simpson" To: Sent: Sunday, August 11, 2002 2:53 AM Subject: [PIC]:Problems writing to program memory on a 18F242 on a PIC 18F242 I have set up a program that erases 64 bytes of program memory and writes 64 bytes of data in 8 byte chunks (per docs). here is the code that sets up the pointer movlw upper program movwf TBLPTRU movlw high program movwf TBLPTRH movlw low program movwf TBLPTRL It eraces fine but the data is offset by 8 bytes. In other words if I set up the pointers to write at 0x3000 the data is written starting at 0x3008. I have to add the following afters seting the pointers to get it to write properly. TBLRD*+ TBLRD*+ TBLRD*+ TBLRD*+ TBLRD*+ TBLRD*+ TBLRD*+ TBLRD*+ Any one done this before??? -- 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 -- 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