Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

MCu oscillator

Status
Not open for further replies.

siyom

Member
When do I need to use external oscillators?I know microcontrollers like atmega16 come with their own internal oscillator.But I've seen cases where an external oscillator is used,when exactly do I need to use them,I know it has something to do with fuse bits,but am not sure what that is.
 
You can select between different clock sources using fuse bits.

Usually you use external clock source when the internal oscillator is not "good enough". So the answer really is: You do know when you need an external oscillator. If you can't think of any reasons to use external oscillator, then use the internal oscillator.

Some usual reasons are:
- Internal oscillator is not fast enough
- Internal oscillator does not provide suitable clock frequency. Some communication protocols are easier to implement when you use some specific frequency. Sometimes you need a very low clock frequency (to save battery power).
- Internal oscillator is not accurate enough.
- You need the exactly same clock for two or more controllers.
 
Last edited:
Not all MCU's have internal oscillators. Then, you must use an external oscillator. If it has in internal oscillator, then the decision to use it depends on the application. If you need higher stability or a frequency that is not available with the internal oscillator (considering various internal scalers) , then use a crystal or ceramic resonator.

John
 
Howdy, I'll second the above: you'll know if it's not good enough (or soon will).

Recent project required synchronization of position of multiple uC units.
I thought internal RTC would be good enough..... WRONG !!
Actual spec has RTC "typical" 1000uS BUT +/- 300uS (!!!!!).
I hadn't read/acknowledged this... My Bad.
I was using RTC as a cadence for communications' & position update.
Primary clock is 14.7MHz xtal, BUT RTC uses an internal clock "independent" of any other clock.
SO, since you can't adjust it, you either use it or not...
Turned out I had units at 1.97Hz, up to 2.15Hz, values spread between...
... talk about slow drift out of sync!
Since position updates are encoder reads, this introduced a creeping error.
Worked around it by using another Timer channel synced to the xtal source.
Now all units read 2.00Hz cadence (but what a wakeup call).

I won't fault Freescale for this, But I will bear umbridge that it's neither trimmable or syncable to a known source.

Just when you think you know what time it is.... G.H. <<<)))
 
Status
Not open for further replies.

Latest threads

Back
Top