On Mar 15, 2007, at 6:19 PM, George Richards wrote: > The original delay loop is for a 4MHz oscillator. For creating > timing loops, > I use a neat little program called picloops (just google for it). > > The erratic operation sounds like a mclr issue. Also, in most cases it helps to pull down the unused IO-pins on the microcontroller - tie them to GND with 10K~47K resistors. At least, that helped me to solve the same issue with 16F877. Another problem may be with your power supply - putting a 100n cap between Vcc and Vdd may help - at least, it never hurts. cheers, Andrei -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist