View previous topic :: View next topic |
Author |
Message |
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
16f887 - external crystal not working |
Posted: Sat Jul 20, 2013 8:45 am |
|
|
Hi all,
I have programmed 16f887 with a simple blink led code.
I have used fuse HS as I am using 8Mhz crystal.
The code is being executed but crystal oscillator is not running.
Oscilloscope 10x probe displays there is no oscillation. The code is running at
4Mhz internal oscillator as timer executes twice delayed.
My question is why even though fuse is set for external oscillator with HS fuse.
Internal oscillator is running and external oscillation is not happening.
Can someone please give suggestions.
Thanks and regards
Jai. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19539
|
|
Posted: Sat Jul 20, 2013 9:13 am |
|
|
Almost infinite possibilities:
Crystal damaged.
Crystal with too little gain.
Capacitors much too large for the crystal
Whisker short.
Open circuit somewhere.
PIC damaged.
Crystal connected to the wrong pins.
etc. etc. etc....
The chip defaults to having FCMEN. 'Fail safe clock monitor enabled'. If the crystal does not start, it will start with the internal oscillator. So running off the internal oscillator is telling you there is something wrong with the external circuit. You can turn this off with the fuse 'NOFCMEN', and then the chip simply won't start if the oscillator doesn't work.
Best Wishes |
|
|
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
|
Posted: Sat Jul 20, 2013 9:46 am |
|
|
Thanks for your reply Ttelmah.
The pic turned out to be faulty as the crystal worked fine with another controller.
Regards,
Jai |
|
|
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
|
Posted: Sat Jul 20, 2013 1:10 pm |
|
|
If it works fine with one chip, but not the other, it may be a defective chip, however, it may also be you are right on the edge of what will run and one starts but the other doesn't. If that is the case, those types of issues have a nasty way of showing up later when the temperature changes etc. or in a production run. Just something to be aware of here.
mikey _________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3 |
|
|
|