I would like some clarification on some of the ATmega32U4's specs and the terminology used in its data sheet. I'm specifically interested in oscillators.
NOTE: Although I have experience with electronics and microcontrollers, I still consider myself just a hobbyist, so feel free to point me to documentation that can help me learn and grasp the basic concepts better. Also feel free to correct my use of terminology, etc..
This article explains why someone would want to use an external oscillator instead of the internal oscillator. The main reasons are an external oscillator will generally have better accuracy and frequency stability.
I assume when people refer to the "internal oscillator" they are talking about the microcontroller's internal RC oscillator. Is that correct?
There are two pins - XTAL1 and XTAL2 - that deal with the microcontroller's use of oscillators.
I assume "XTAL" is an industry term for "crystal". Is that correct? Does that mean the pins can only use crystal oscillators for input? Or can I also use a resonator, oscillator module, or just a generic square wave from "some clock source" as input to XTAL?
Based on Figure 6-6 - attached - in the data sheet, I assume I can use an external clock source or the internal oscillator to drive the microcontroller. I just have to set the correct fuses to make sure I select my clock source properly. Is that correct?
Is the component labeled "RC OSCILLATOR 8 MHz" in Figure 6-6 the microcontroller's internal oscillator?
Section 33.2 in the data sheet says that the ATmega32U4-MU and ATmega32U4RC-MU "are shipped with no USB bootloader pre-programmed". Yet the Features section of the data sheet mentions "Parts using external XTAL clock are pre-programed with a default USB bootloader". Is that an error in the data sheet?
Section 33.2 in the data sheet mentions application note AVR291 with regards to the ATmega32U4-MU and ATmega32U4RC-MU. Yet the application note says it only applies to the ATmega32U4RC-AU and ATmega32U4RC-MU. The application note deals with tuning/calibrating the internal oscillator for low-speed USB operation. Is that an error in the data sheet?
Sections 6.2.1 and 6.2.2 in the data sheet mention:
- The ATmega32U4 "is shipped with Low Power Crystal Oscillator (8.0 - 16MHz) enabled and with the fuse CKDIV8 programmed, resulting in 1.0MHz system clock with an 8MHz crystal".
- The ATmega32U4RC "is shipped with Calibrated Internal RC oscillator (8.0MHz) enabled and with the fuse CKDIV8 programmed, resulting in 1.0MHz system clock".
What is the difference between these two internal oscillators?
Can the ATmegaU4's (non-RC variants) internal oscillator be set to run at 16 MHz?
Based on the research I've done, here are my assumptions:
- All ATmega32U4's come with an internal 8 MHz internal RC oscillator. The fuses are factory-set to divide the clock down to 1 MHz. The ATmega32U4RC's internal oscillator is specially calibrated for better accuracy.
- All ATmega32U4's can be optionally driven by an external oscillator (e.g. such as a crystal oscillator).
- As long as the proper fuses are set, the user can choose to drive their microcontroller either from an external oscillator or the internal oscillator - for any variant of the microcontroller.
Are my assumptions correct? Please correct me, if I'm wrong.