One other thing to consider -- If you are using the internal RC oscillator, you have read the JW part and write down the OSCCAL value at 0x3ff before you program it. It has to be programmed back in after every UV erasure. Bill -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Spehro Pefhany Sent: Monday, March 01, 2004 8:28 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC:] 12C509 problem At 12:37 PM 3/1/2004 +0000, you wrote: > >Is there a difference ( or several differences) > >between a 509 OTP and a 509 Eprom? > >People have reported problems like this in the past, but typically in >the reverse direction, I.E. JW->OTP. > >What is known to happen is that the light coming in the window of a JW >part will initialise RAM registers to different states to the OTP >parts. It would pay to check through your code to make sure that the >RAM registers are being properly initialised by your program. You may >have just got away with it in the OTP part, and another one may work >differently. As well, if you first programmed it with a non-working program and then attempted to erase and program a working program, you may have a problem, if you protected the memory. On the UV erasable (JW) parts the protect bit is often made deliberately difficult or impossible to erase compared to the rest of the program. This prevents re-use of the part, except as a tie clip or something, so you have remember never to set it. Best regards, Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu