On 25-Nov-10 13:24, David Duffy (AVD) wrote: > ivp wrote: >>> I guess the only other thing I can try before replacing the PIC is >>> to add some debugging pin code, maybe to the UART ISR for >>> starters >>> >> >> How about disconnecting the receiver until the PIC has stabilised, >> or something like that. Might help identify where the problem really >> is >> > I'll give that a go tomorrow. The receiver output is full of random > noise when idle, but it is the same on all boards. > > As for power, there's not much to the circuit. A 12V battery via a > 1N4007, into a 78L05 with a 100uF on the input. > > What's really odd about this is that replacing the chip fixed the > problem on the first faulty unit. Apart from those two units, all the > others work well. > > I'd bet money that replacing the PIC will solve the problem, but I'd > really like to know why before I do that. Since it is a TQFP package, > swapping them back and forth not an option. > > I do have brown-out detect enabled IIRC. The only other idea I have is > that the power-up timer is bad on some chips. Seems unlikely though. > David... > Are you clearing all registers at the beginning of the program? The bad=20 PICs could power up with some inconvenient RAM value that you forgot to=20 initialize. If not that, try to connect the PIC TX line to a PC and transmit back=20 all what you receive. If you don't get good data, use the PC for both TX=20 and RX try again. Djula --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .