PDA

View Full Version : Internal vs. external osc for comms



mtripoli
- 28th January 2010, 18:07
I *was going to* post this in the "Data Comm-Serial" section but its a general question...

To those that have used both: I'm working on a system where I'll be transmitting serial data (low speed; haven't decided yet but could be as low as 300 BAUD, using UART) via RF. I'd like to use the internal osc, however I've seen posts (on the net at various places) of people that have had problems with this. *Now for the elitist statement*: I haven't put much faith in the "poster" and the "replies" do to the fact that it usually looks like neither of them had a clue what they were doing in the first place (I'm not a big fan of the current trend of "LEGO electronics"). I've done lots of high speed wired stuff with an external osc and never had a problem. I've done non-comm with the internal; just haven't used the internal with communications.

Given a proper PCB layout and all the correct supply values, decoupling, known working RF link; you know, all the stuff that should be there in the first place, is the internal osc "precision" enough for reliable data transfer.

I know, why not just use the external osc if it's a question; because I want those two pins :)

Thanks,

Mike Tripoli

rmteo
- 28th January 2010, 20:03
I have used the internal oscillator for Asynch Serial Comms at speeds from 300 to 115200 baud successfully. Some things to look out for. The newer PIC's have better tolerences (those released in the last 2-3 years or so). Operating temperature is the main consideration. Most of my apps have been indoor types at typical room temperatures. If there are wide temperature variations during operation, an external oscillator may be more appropriate. Here are some numbers from a PIC16F690.

http://home.earthlink.net/~rmteo/sitebuildercontent/sitebuilderpictures/a_68w.jpg

polymer52
- 29th January 2010, 00:45
I've use the 12f629,675,683 and the 16f628a all at 2400 and all with just a plain twisted pair wire up to 25 feet with great results.
I just send data to serial data lcd's so I don't need high speeds. These are mounted outside and I've had the temp to range from 15 to 80 deg F.

Bruce
- 29th January 2010, 01:26
rmteo is spot-on.

I've used a ton of newer rev PICs' with internal osc specs @1% for serial communications, and never had a single glitch - as long as they were used in a controlled environment where the temparature remained failry constant.

Step outside this, where the temerature can change quickly, and you're just asking for trouble. In this case .. for sure go with a good quality external crystal, or even a quality resonator. Crystals beat resonators hands-down, and are a bit more expensive, but are worth the expense for peace of mind.

If you need the absolute best precision, then go with an external TTL oscillator. These beat all of the above, but they for sure will increase current demand on your power supply.

I have tested all-of-the-above in very harsh conditions here in Colorado, and I guarantee it does make a HUGE difference.

mtripoli
- 29th January 2010, 14:58
Thanks very much for the replies. This is exactly what I was looking for. I did look at the specs in the data sheet and saw the numbers; I really needed some feedback from those that have done it and what they've found. In this application the transmit/recieve units are always used indoors (its a "party atmosphere") so I'm comfortable with using the internal osc.

B'rgds,

Mike Tripoli