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 vs. external crystal

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



Joined: 04 Apr 2013
Posts: 20

View user's profile Send private message

Internal vs. external crystal
PostPosted: Thu Sep 07, 2017 7:01 am     Reply with quote

Hi
1. What are the advantages and disadvantages of using EXTERNAL or INTERNAL
CRYSTAL on pic micro ?
2. I am using CX1SM - 2.0MHz crystal.
My pic18f8722 is on sleep and awakes from int ext.
The problem is the latency from int to ext isr is about 10msec (does it make sense ?).
I solved it by enable "two speed startup".
Is it the right way ? Will temp effect it ?
Regards
Yossi
Ttelmah



Joined: 11 Mar 2010
Posts: 19545

View user's profile Send private message

PostPosted: Thu Sep 07, 2017 7:14 am     Reply with quote

There isn't an internal crystal.

There is an internal oscillator, that is relatively low accuracy.

The data sheet is your friend here. +/-2% typically at room temperature +/-5% for the chip's whole temperature range.

Your startup time for the oscillator is determined by the loop gain of the oscillator. Adding a resistor across the crystal may well improve this.

_Everything_ is affected by temperature. The question is 'by how much'....
newguy



Joined: 24 Jun 2004
Posts: 1909

View user's profile Send private message

PostPosted: Thu Sep 07, 2017 7:19 am     Reply with quote

External crystal advantages:
- Higher frequency accuracy. If you need to interface to some external circuitry or external bus (particularly CAN or USB), a crystal is pretty much required.
- Higher frequency accuracy over temperature and supply voltage variation. Although it's possible to get some PICs with ~1% internal oscillator accuracy, that ~1% is specified for a very small temperature and supply voltage "window". Outside that window, accuracy degrades.

Internal oscillator advantages:
- Smaller component count (lower cost).
- Smaller PCB footprint (lower cost).
- Smaller wake up (or power up) to being able to execute code delay. As long as a PLL is NOT involved, of course.
- Usually smaller current draw than having a comparable external crystal.
- Pretty much guaranteed to start & run no matter what. Sometimes crystal circuits can be finicky if you didn't design the PCB 100% correctly or if your crystal changes (originally specified part becomes obsolete or isn't available for whatever reason).

There are probably others. This is just off the top of my head.
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