CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

16f887 - external crystal not working

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
jaikumar



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

16f887 - external crystal not working
PostPosted: Sat Jul 20, 2013 8:45 am     Reply with quote

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: 19513

View user's profile Send private message

PostPosted: Sat Jul 20, 2013 9:13 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Jul 20, 2013 9:46 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Jul 20, 2013 1:10 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group