NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Basic Electronics » MCU Clock Implementation

August 06, 2010
by Mujda
Mujda's Avatar

I have a question regarding the arrangement for the external crystal for the nerdkits kit. It ships with a 14.(something)MHz crystal. The ATmega168 datasheet shows 20pF capacitors connected each side of it to earth, but the nerdkits circuit has nothing, and works fine without it. What benefit is there with the capacitors?

Also, I'm currently running the nerdkits Bootloader using the internal oscillator @ 8MHz. It seems to be working fine (I changed the configuration of the USART to account for this), but could this cause a problem with the USART connection, where timing can be critical?

Also, is there a minimum speed the MCU can function at? I'd like to use a watch crystal (32kHz ish), way slower than you'd normally want. Would this need extra componentry?



August 06, 2010
by Rick_S
Rick_S's Avatar

The capacitors are sometimes needed to give the crystal a "kick" to get it oscillating. Because the NerdKit it built on a solderless breadboard, the inherant capacitance between the breadboard contacts server the purpose and thus the capacitors are usually not needed. If you were to build a circuit on a permanant soldered breadboard good building practice would be to use a couple of capacitors to ensure proper operation of the oscillator cirucuit.

At 8MHz, you will see an increased error depending on the baud rate you are running. This margin of error can be anywhere from a small amount that won't effect much to a large error that will prevent communication altogether. Another issue you will see if the temperature changes much around your micro-controller, you may see a fluctuation in clock speed as the internal oscillator does not use a crystal for it's time base. Therefore a baud rate that works great at 75°F may not work at all at 32°F or 95°F.

You can run the MCU with a 32KHz watch crystal see the section in the datasheet for Low Frequency Crystal Oscillator.

Hope that helps some,


Post a Reply

Please log in to post a reply.

Did you know that talking to the microcontroller over the USB/Serial link is easy under Windows, Linux, and OS X? Learn more...