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: 19505
Posted: Thu Sep 07, 2017 7:14 am
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: 1907
Posted: Thu Sep 07, 2017 7:19 am
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.
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