Why does the Arduino Uno board have 2 external Oscillators?

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As the image shows, there are 2 external Oscillators, one for the "16u2" AVR Chip which acts as the USB to Serial converter (Red one) and the other is connected to the AVR Chip (Yellow one).

Do both of these chips not have internal Oscillators? why do they need external ones as-well?

 

Last Edited: Tue. Jun 30, 2020 - 07:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

The internal RC oscillators are subject to frequency changes due to changes in VCC voltage and or temperature changes, so for solid and stable frequency control, external crystals or resonators are used,

things like timers, and serial comms, need the more accurate frequency stability provided by these external devices. 

The internal RC oscillator works fine for most other uses.   Example: I make a solar controller, using a ATtiny25, although I use the timer, its function is not frequency dependent, it works fine even if the frequency of the clock changes 10%, so not all apps need an accurate clock frequency.

 

Hope that helps (am I getting an A on your test)?

 

Jim

 

 

FF = PI > S.E.T

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Great explanation, thank you.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I've always wondered why they had two resonators.  Surely one is enough for both.  They're already using the more accurate and more expensive crystal oscillator for the 16u2 (for the UNO R3), and its CKOUT pin could drive the m328p's XTAL1.  Would be more accurate than the crappy 3000 ppm ceramic resonator they've got, and it would be lower power, too.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Maybe they design it this way for people who want to replace the crystal on the mega328p by another frequency?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

the original UNO had only one xtal/resonator for the atmega, and used a USB-serial TTL chip for comms, but that was replaced by the 16U2 atmega as it was cheaper.

By using it's own xtal, no changes to how the M328 is set up (fuses) from previous versions.

The Xplained boards use a similar setup, but use the clock from the bridge/debug chip to clock the atmega which allows it to change clock speed with a change in VCC level.

 

Jim

 

 

FF = PI > S.E.T

 

Last Edited: Wed. Jul 1, 2020 - 05:50 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If they switched from FTDI to the CH340 for USB to save $5, the CH340 wants it's own 12 MHz crystal to work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:

By using it's own xtal, no changes to how the M328 is set up (fuses) from previous versions.

Using an external clock won't change that.  As a bazillion threads here will attest, you can feed an external clock into XTAL1 even if the AVR is fused to use an external ceramic or crystal resonator.

 

El Tangas wrote:

Maybe they design it this way for people who want to replace the crystal on the mega328p by another frequency?

Perhaps, but I think that's a bit of a stretch.  An exceedingly small percentage of users would undertake that.

 

I think it is more likely an indicator of the general skill level of the designers behind the Arduino.  Other examples:

  • unnecessary and inappropriate bias resistor across the resonators of both the 16u2 and 328p
  • PCB layout error in original Arduino which led to the non-standard header spacing between pins 7 and 8, inherited to this day

 

A short list, to be sure, but a better sparky than I could likely list some more.  A zero-length list would be better ;-)

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

With engineering design, there are always many ways to get stuff done - there is very seldom one, single , "correct" design.

 

So it's all a bit pointless getting hung up on "why did they do it this way?" 

 

The only way to answer that would be to ask the actual designer(s) - and they would probably agree that they could have done it differently.

 

They may well say that, with hindsight, they would have done it differently.

 

And, of course, the tools, available components, economics, etc, were different back then

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...