View previous topic :: View next topic |
Author |
Message |
lyndia
Joined: 19 Jul 2009 Posts: 5
|
Crystal or Internal Oscillator |
Posted: Fri Jul 31, 2009 9:25 am |
|
|
I'm fairly new to using PICs, so plz correct me if I'm wrong:
I'm under the impression that external crystals are more accurate than internal oscillators. Are there any other advantages/disadvantages associated with using either?
I will use the PIC for a PID controller of a precision vacuum pump. Now I see that I do have room on the PCB I'm designing, I wonder if I should add in a crystal.
Thanks. |
|
|
Jerson
Joined: 31 Jul 2009 Posts: 125 Location: Bombay, India
|
|
Posted: Fri Jul 31, 2009 10:04 am |
|
|
If you are looking for general accuracy, go with the internal oscillator. Saves on the crystal and its associated costs. If you need precision of frequency and drift, choose external crystal. You should check that the PIC you plan to use has an internal oscillator option if you need to use it. _________________ Regards
Jerson Fernandes |
|
|
mkuang
Joined: 14 Dec 2007 Posts: 257
|
|
Posted: Fri Jul 31, 2009 10:26 am |
|
|
A good quality crystal with 30ppm accuracy from -40C to +85C costs about 50cents in quantities of sevral hundred to a thousand. I don't know about you but I would not want to save the 50 cents if I have the board space (plus two associated capacitors of course). This is even more important if you are doing any sort of asynchronous communication like RS232 or RS485. The internal oscillators in the PICs are typically about 2% accurate, at room temperature. So if your device is sitting in a lab all day it probably doesn't matter but if you ever send it out into the hot sun where it can to +60C easy and you want reliable transmission then it is anybody's guess what's going to happen. |
|
|
lyndia
Joined: 19 Jul 2009 Posts: 5
|
|
Posted: Fri Jul 31, 2009 2:04 pm |
|
|
Thanks =) |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Fri Jul 31, 2009 7:13 pm |
|
|
The PIC internal oscillators almost always work well enough for RS232 comms. They only fail when your CUSTOMER tries to use it!
Check out the oscillator accuracy graphs in the PIC datasheets. If you run at less than 5V or other than room temperature RS232 becomes a gamble. Note that if you are communicating with a PC, the PC may also have some baud rate error. If the PIC drifts one way and the PC drifts the other way you are DOOMED!
Be smart and use a crystal, or a ceramic resonator if price is a big issue. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
|