James, What sort of reset circuit do you have on the PIC's /MCLR pin? It sounds possible that your circuits do not get a reliable startup reset. One other possibility is that the current surge into the led circuits could be causing the pic to operate strangely. If the caps are discharged, you will have 20mA of initial charge current. If several of the leds are commanded to be on at once, this could disrupt the pic. This doesn't explain why your circuits always work the first time but not subsequent times. Are you 100% certain of this? As far as stored charge goes, the diode in series with the pic pin should avert problems there. One other thought - if your batteries get low, their internal resistance will rise and the startup surge could make the pic start up at voltage levels too low for correct operation. HTH, Tom At 11:46 AM 10/11/2003 -0700, you wrote: >I have a simple circuit using a a 16F84A running with a 4Mhz crystal. > >I have 12 LED's that I want to randomly turn on and then fade out. >Instead of using the chip to fade it out, I have a simple RC circuit for >each LED. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.