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

internal oscillator VS external XTAL

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



Joined: 01 Oct 2012
Posts: 7

View user's profile Send private message Yahoo Messenger

internal oscillator VS external XTAL
PostPosted: Fri Oct 05, 2012 12:37 pm     Reply with quote

What is the advantage of using an external XTAL with a PIC ? I see a lot of projects that use for example the 16f628 or 16f84 use an external XTAL. I have done a few projects and I always use the internal one and I save 2 pins and some space.

I do understand the purpose of using an external clock signal (to sync with other parts of the circuit) but the external XTAL ?

Thanks,
Vlad
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Fri Oct 05, 2012 1:25 pm     Reply with quote

Accuracy.
The internal clock on many PIC's is 'barely adequate' for things like serial. Usually OK at room temperature, but for anything requiring better timing is just not good enough.
So (for instance) CAN bus is just useable at lower data rates, but for anything faster needs either a resonator or crystal.
USB at fast speed requires a crystal.
Anything with similar timing requirements, needs a more accurate timing source.

Best Wishes
John P



Joined: 17 Sep 2003
Posts: 331

View user's profile Send private message

PostPosted: Fri Oct 05, 2012 5:25 pm     Reply with quote

The accuracy may be important, and if you use a crystal you can go a lot faster than using the internal oscillator. But a serial link ought to work if at least one of the processors has a crystal-controlled clock.

The 16F84 is an obsolete part (as has been said here many times!) and one reason for avoiding it is that it doesn't have the internal oscillator feature.
cykrus



Joined: 01 Oct 2012
Posts: 7

View user's profile Send private message Yahoo Messenger

PostPosted: Fri Oct 05, 2012 9:47 pm     Reply with quote

very clear now. thank you
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