> > > >Any ideas why it works with the debugger and not with the PIC? > >Common things to do wrong? I've been using the EEPROM read/write code from > >Microchip. > > Do you allow enough time for each write to finish? > Yes, I do use: BTFSC EECON1, WR ;Wait for GOTO $-1 ;write to finish But since I only need to write to EEPROM during startup, I found an other solution: org 0x2100 DW 0x33 . . So I'll think I use this for now and try to solve the writing problem if I need to write while the program is running. But why doesn't this operation work? bsf lastState_out1,cnt2 cnt2 always have the value 0-7. lastState_out1 always gets 0x01. I also tried to swap the bits but it's still the same. /Andreas -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body