Searching \ for '16F874 PIC Refuses to Start Up?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/devices.htm?key=16F
Search entire site for: '16F874 PIC Refuses to Start Up?'.

Truncated match.
PICList Thread
'16F874 PIC Refuses to Start Up?'
2000\04\11@111002 by Kieran Miller

picon face
Hi,

I have a PIC 16F874 sitting in a socket on my PCB, and as far as I am aware,
it's simply refusing to start up.

I've checked the power and ground connections, and it programs (in circuit)
correctly. It's driven by a 20MHz crystal (parallel resonant), with 15pF
capacitors to ground on either side of the the crystal. When I programmed
it, the HS oscillator configuration bit was set.

I've tried changing the crystal loading caps - I've doubled them up to 30pF,
but still no joy. I don't have a 'scope handy, but I had thought that the
oscillator just wasn't starting up - is this likely?

I programmed the PIC with this piece of code - and attached an LED between
RE0 and ground (with a 10k current limiting resistor in series). A similar
code snippet works fine on a 16F84 (using an LED on RA0), but
the LED doesn't light when I power the 16F874.

I tried checking the current draw on the circuit, and I was surprised to see
that it was only 20mA. Also in circuit are an MP3 decoder, a DAC, and a
Hitachi 44780 compatible LCD module.

Any ideas? What should I try next? I can post a circuit diagram if that's
any help to anyone.

Thanks for your help,

Kieran

2000\04\11@112234 by ND Holmes

flavicon
face
<x-flowed>Think your problem is probably that you forgot to shut off the A/D
converter - parts of RA and RE come up as A/D inputs by default and only
become digital I/O when you write to ADCON1 - just put a 6 into ADCON1 and
that should switch them all back to being digital I/O lines.

ND Holmes
--------------------------------------------------------------------------
 Nathan D. Holmes   spam_OUTmaverickTakeThisOuTspamdrgw.net, .....ndholmesKILLspamspam@spam@iastate.edu
   122 Shepard #3  Box 328  Gilbert, IA 50105  Iowa State University - EE
   http://www.drgw.net/~maverick   PH: 515-663-9368
   "Unless a man has creativity and self-motivation, freedom is an irksome
burden."
-------------------------------------------------------------------------

</x-flowed>

2000\04\11@162738 by l.allen

picon face
Keran wrote..

> I have a PIC 16F874 sitting in a socket on my PCB, and as far as I am aware,
> it's simply refusing to start up.
>
> I've checked the power and ground connections, and it programs (in circuit)
> correctly. It's driven by a 20MHz crystal (parallel resonant), with 15pF
> capacitors to ground on either side of the the crystal. When I programmed
> it, the HS oscillator configuration bit was set.
>
> I've tried changing the crystal loading caps - I've doubled them up to 30pF,
> but still no joy. I don't have a 'scope handy, but I had thought that the
> oscillator just wasn't starting up - is this likely?
>
>
> Any ideas? What should I try next? I can post a circuit diagram if that's
> any help to anyone.
>
The first thing you MUST establish is if the xtal is
oscillating.
The oscillator may be not working for a variety of reasons
but its usually that the wrong oscillator type has been
selected at the programming stage.

If a scope is not handy then you could try a simple signal
detector connected to a voltmeter.
A detector could be a signal diode (1n914), cap(1nF),
Resistor to ground (1 Meg). See hideous ascii art.

 To osc pin   -----l>l---l l---+------- to meter
                                     l
                                           1Meg
                                                   l
                                  Gnd

This will yield some voltage above ground but less than 5
volts if the oscillator is working (2.5 volt in theory). No
oscillation will pretty much be ground or 0volts.  Its a
start anyway.
_____________________________

Lance Allen
Technical Officer
Uni of Auckland
Psych Dept
New Zealand

http://www.psych.auckland.ac.nz

_____________________________

2000\04\11@174524 by Kieran Miller

picon face
> The first thing you MUST establish is if the xtal is
> oscillating.

Yeah - thought so.. :)

I've borrowed a scope, and I have a 16MHz oscillator I'll try if the crystal
isn't oscillating.

How difficult is it to get crystals going generally? What can be wrong,
apart from a duff crystal?


> If a scope is not handy then you could try a simple signal
> detector connected to a voltmeter.

Thanks - useful for future reference!

Kieran

2000\04\11@180004 by David E Arnold

picon face
a very simple way to test for oscillation ont he xtal pin is to use a
logic probe.

-Dave





Kieran Miller <kieranspamKILLspamMAC.COM> on 04/11/2000 02:44:01 PM

Please respond to pic microcontroller discussion list <.....PICLISTKILLspamspam.....MITVMA.MIT.EDU>

To:   EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU
cc:    (bcc: David E Arnold/SYBASE)
Subject:  Re: 16F874 PIC Refuses to Start Up?




> The first thing you MUST establish is if the xtal is
> oscillating.

Yeah - thought so.. :)

I've borrowed a scope, and I have a 16MHz oscillator I'll try if the crystal
isn't oscillating.

How difficult is it to get crystals going generally? What can be wrong,
apart from a duff crystal?


> If a scope is not handy then you could try a simple signal
> detector connected to a voltmeter.

Thanks - useful for future reference!

Kieran

2000\04\11@182647 by David VanHorn

flavicon
face
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


>How difficult is it to get crystals going generally? What can be wrong,
>apart from a duff crystal?

It's not.
Make sure you have a paralell resonant crystal, and you have the right
loading caps.
The xtal's spec will say something like 18pF load (or some other value)
Take two caps at twice that value, minus about 5pF as a first shot. In this
example, then I'd want 31pF, 27 would probably be ok, 33 better. Make sure
these caps return directly to the chip's ground pin.

If you have a series resonant xtal, it will probably still "work" but
you'll have to guess at the loading values (try 22pF caps) and it won't
ever get to the frequency that the crystal says it's cut for. (impossible)

>
>> If a scope is not handy then you could try a simple signal
>> detector connected to a voltmeter.

A DVM will usually read about 2.5V when connected to the osc out pin

A shortwave radio with BFO is real useful for checking oscillation, and
frequency.
There are exact frequency signals at 2.5 5, 10, 15  and 20 MHz that you can
use to check the receiver accuracy, and from that you can get a pretty good
idea where your rock is singing.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com>

iQA/AwUBOPPAbIFlGDz1l6VWEQLA+ACggMYbQc4+w+L2eVz7bCkDZyEsBaMAnAph
IblV43fNjjxSMH443ScySMAs
=vkQG
-----END PGP SIGNATURE-----

2000\04\11@184148 by Tony Nixon

flavicon
picon face
Kieran Miller wrote:
>
> Hi,
>
> I have a PIC 16F874 sitting in a socket on my PCB, and as far as I am aware,
> it's simply refusing to start up.

Make all unused port pins outputs to avoid floating inputs.

Read the chip contents back with your programmer and "verify" that the
code and fuse settings are correct.

Make sure LVP or DEBUG is not enabled.

Make sure both VCC and VDD pins are connected.

Check that MCLR is connected to VCC

--
Best regards

Tony

http://www.picnpoke.com
salesspamspam_OUTpicnpoke.com

2000\04\11@190058 by David E Arnold

picon face
How do you use a Shortwave Radio to check an oscillator frequency?

-Dave





David VanHorn <@spam@dvanhornKILLspamspamCEDAR.NET> on 04/11/2000 05:16:45 PM

Please respond to pic microcontroller discussion list <KILLspamPICLISTKILLspamspamMITVMA.MIT.EDU>

To:   RemoveMEPICLISTTakeThisOuTspamMITVMA.MIT.EDU
cc:    (bcc: David E Arnold/SYBASE)
Subject:  Re: 16F874 PIC Refuses to Start Up?




-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


>How difficult is it to get crystals going generally? What can be wrong,
>apart from a duff crystal?

It's not.
Make sure you have a paralell resonant crystal, and you have the right
loading caps.
The xtal's spec will say something like 18pF load (or some other value)
Take two caps at twice that value, minus about 5pF as a first shot. In this
example, then I'd want 31pF, 27 would probably be ok, 33 better. Make sure
these caps return directly to the chip's ground pin.

If you have a series resonant xtal, it will probably still "work" but
you'll have to guess at the loading values (try 22pF caps) and it won't
ever get to the frequency that the crystal says it's cut for. (impossible)

>
>> If a scope is not handy then you could try a simple signal
>> detector connected to a voltmeter.

A DVM will usually read about 2.5V when connected to the osc out pin

A shortwave radio with BFO is real useful for checking oscillation, and
frequency.
There are exact frequency signals at 2.5 5, 10, 15  and 20 MHz that you can
use to check the receiver accuracy, and from that you can get a pretty good
idea where your rock is singing.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com>

iQA/AwUBOPPAbIFlGDz1l6VWEQLA+ACggMYbQc4+w+L2eVz7bCkDZyEsBaMAnAph
IblV43fNjjxSMH443ScySMAs
=vkQG
-----END PGP SIGNATURE-----

2000\04\11@200743 by Quitt, Walter

flavicon
face
You turn on the BFO and tune to the frequency of your
osc signal.  If you hear a tone and can turn it on
and off with the target power, "you're there."

NOTE: You may not need a BFO, but it makes it easier
to hear your signal.

Also, recall your osc is a square wave, so there will
be many places on the dial you'll hear signals.  The
strongest, of course, is the target fundamental frequency.

-Walt...

{Original Message removed}

2000\04\11@211103 by Dale Botkin

flavicon
face
Also make sure you specifically selected XT or HS ocsillator.  I chased my
tail for an hour before figuring out the programmer defaulted to RC, and I
hadn't changed it.

Dale

On Wed, 12 Apr 2000, Tony Nixon wrote:

{Quote hidden}

---
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..."
               -- Isaac Asimov

2000\04\11@225225 by David VanHorn

flavicon
face
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 03:59 PM 4/11/00 -0700, David E Arnold wrote:
>How do you use a Shortwave Radio to check an oscillator frequency?

Tune it in :)

If it says 8.000 MHz, then that's where it should tune in.

First, turn on the VFO, and tune in WWV at 10.0 MHz preferrably, or 5.0, or
anywhere else. (You want it as close to the osc as possible)

Turn on the BFO, and adjust to a low note that you can hear well.
Keep it low, as you can end up on either side of zero. (hard to explain,
but try it, and you'll see)

Now tune in the osc, and you should hear the same low note if the osc is in
tune.
What you'll probably hear is a higher note, indicating that it's a little off.
Adjust the osc till it's the same as WWV, without moving the BFO.

You can also tune in the third harmonic and check for radiation.
It's hard to judge without some similar device to get levels from, but with
a little experience, you can tell how much noise you are radiating.

I use an Icom R-8500 for this sort of EMI testing, it covers 0.1 MHz to
1999.999 MHz continuously.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com>

iQA/AwUBOPP+6YFlGDz1l6VWEQKnuQCfc7z7w62WZOuD0cO3Ovo+Yu1SeH0AoLgE
ZTVUKhu0AhERdnjmlNrdny43
=WKRP
-----END PGP SIGNATURE-----

2000\04\12@062048 by Jinx

face picon face
----- Original Message -----
From: Tony Nixon

> Kieran Miller wrote:
> >
> > Hi,
> >
> > I have a PIC 16F874 sitting in a socket on my PCB, and as far as I am
> > aware, it's simply refusing to start up.
>
>
> Check that MCLR is connected to VCC
>

>From what I can tell on the F84 (I'm not familiar with the 874), the
crystal fires up whether MCLR is at 0V or Vcc. Surprised me. The only
comment I'd have otherwise about MCLR is that I got caught out badly
once (and only once !!) by a very very fine solder whisker between 0V
and MCLR, which on the F84 are adjacent pins.

SLEEP stops the oscillator -- have you got a SLEEP routine ?

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...