Oscillator not running on 16F873

Started by Andrew May 27, 2010
Hi

I have developed some code to control RGB LEDs from a PIC16F873A chip. The code was working, but now the oscillator is not running. I've checked the connections between the crystal, processor 4MHz crystal, and 22pF caps, and everything is in tact.

I'm using the CCS PCM C compiler, I have set the #fuses to:
#fuses XT,NOWDT,NOPUT,NODEBUG,NOPROTECT,NOBROWNOUT,NOLVP,NOCPD

Can someone my be going wrong please?

Thanks

Andrew

This can be caused by the supply line impedance being too high. Do you have decoupling capacitors across the supply and ground pins close to the PIC?

Brian.

--- In p..., "Andrew" wrote:
>
> Hi
>
> I have developed some code to control RGB LEDs from a PIC16F873A chip. The code was working, but now the oscillator is not running. I've checked the connections between the crystal, processor 4MHz crystal, and 22pF caps, and everything is in tact.
>
> I'm using the CCS PCM C compiler, I have set the #fuses to:
> #fuses XT,NOWDT,NOPUT,NODEBUG,NOPROTECT,NOBROWNOUT,NOLVP,NOCPD
>
> Can someone my be going wrong please?
>
> Thanks
>
> Andrew
>

>>

I have developed some code to control RGB LEDs from a PIC16F873A chip. The
code was working, but now the oscillator is not running. I've checked the
connections between the crystal, processor 4MHz crystal, and 22pF caps, and
everything is in tact.

<<

I realise this is probably a silly suggestion, but have you remembered to
put a pull-up resistor on the Reset pin?

I ask simply because older PICs don't need one: the Reset input floats high
of its own accord, whereas on more modern PICs it seems to float around
anywhere. I spent ages puzzling over a 16F818 which wouldn't run, but which
started running - at half speed - whenever I put my hand close to the
prototyping board. The 50Hz electric field from my hand was enough to drive
the Reset pin voltage over the threshold voltage 50 times per second, unless
I earthed myself, in which case the processor remained reset.

Anyway, it's a long shot but I thought I'd mention it.

Steve
Brian, & Steve,

Thanks very much for getting back to me, I really appreciate that.

Steve your suggestion was correct. I hadn't considered that issue, mainly because there isn't a pin labelled "Reset". However tPin 1 can be used as a reset pin and should be pulled high.

Thanks

Andrew

--- In p..., "Staiger" wrote:
>
> >> I have developed some code to control RGB LEDs from a PIC16F873A chip. The
> code was working, but now the oscillator is not running. I've checked the
> connections between the crystal, processor 4MHz crystal, and 22pF caps, and
> everything is in tact.
>
> <<
>
>
>
> I realise this is probably a silly suggestion, but have you remembered to
> put a pull-up resistor on the Reset pin?
>
>
>
> I ask simply because older PICs don't need one: the Reset input floats high
> of its own accord, whereas on more modern PICs it seems to float around
> anywhere. I spent ages puzzling over a 16F818 which wouldn't run, but which
> started running - at half speed - whenever I put my hand close to the
> prototyping board. The 50Hz electric field from my hand was enough to drive
> the Reset pin voltage over the threshold voltage 50 times per second, unless
> I earthed myself, in which case the processor remained reset.
>
>
>
> Anyway, it's a long shot but I thought I'd mention it.
>
>
>
> Steve
>