Hi Rob, Do you have a pullup resistor on the MCLR pin? Instead of driving the relays directly from the PIC, how about using transistors. Yes use .1uF caps for every IC on your board as close as possible to the IC Vcc/Vdd pin. Randie randie.ohtsji@glenayre.com > -----Original Message----- > From: Rob [SMTP:robzs@HICOM.NET] > Sent: August 13, 1998 8:06 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: Intermittent PIC operation > > On Thu, 13 Aug 1998, John Haggins wrote: > > > As a beginner, it took me a while to figure out that all UNUSED i/o > lines > > MUST be tied to the power supply (CMOS rule - all inputs must go > > somewhere). For weeks I was getting intermittent results because I > didn't > > know this rule. > > All I cna say is that on PortB, where I am exercising the intermittinet > problem, all pins are connected to either LED's, relays or an RS232 > transceiver chip. Though, I take your point as being extremely valid, > since on another project had a similiar experience. > > I'm still baffled. I have been told to use a scope to check the lines and > I will install .1uF bypass caps instead of 1.0uF (the only ones I had > available at the time) > > Rob > > > > > Sounds like this may be your problem. Incidently, I found the answer in > the > > book "Easy PIC'n" which gets my vote as best beginners book (and I've > got > > them all :) Amazingly, none of the books highlight these symptoms or > give > > any kind of bold text warning/tip - it must be a common cause of failure > > for beginners. > > > > John > > > > > > At 12:26 AM 8/13/98 -0400, you wrote: > > >Hi, > > > > > >I am having a problem with a protoype build of a PIC circuit. I have > Port > > >B connected to 2 LED's (2 mA each), 3 relays (13 mA each) and 3 to an > MAX > > >232 chip. The chip is a 16C72, windowed. > > > > > >I wrote a simple program in MicroEngineering Labs PIC Basic to see test > the > > >operation of the PIC. It goes as follows: > > > > > >High 0 > > >Pause 1000 > > >Low 0 > > >Pause 1000 > > >High 1 > > >Pause 1000 > > >Low 1 > > >Pause 1000 > > > > > >the rest goes on to do the same with the other lines conected to the > relays. > > > > > >RB0 and RB1 operate the status LED's. I energize the circuit and the > LED > > >connected to RB0 Blinks on one second then off. Then the LED connected > to > > >RB1 doesn't light. Or sometimes the RB0 LED lights goes off then RB1 > > >lights and goes off. Most of the time though the RB1 LED never lights. > > > > > >Why is the operation of this so intermittent? > > > > > >I set Watchdog timer OFF during compilation. The MCLR is connected to > a > > >DS1233 like Myke Predko recommends. The crystal is 4 MhZ, with 22pF > loads. > > > The current draw on Port B is less than 50mA max. The circuit is > powered > > >through a 5V regulator with a 9V battery. The relays have protection > > >diodes on the coils to prevent surge currents from damaging the PIC. > The > > >PIC has a bypass cap at the Vdd and Vss. > > > > > >This has me stumped. > > > > > > > >