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 » Using Internal 8 MHz Oscillator

May 09, 2012
by RogerFL
RogerFL's Avatar

I'm trying to run on the 8 MHz internal clock and use the UART.

Looks like the errors are bad when AVR transmits but pretty reliable on receives. For example, I modified the boot loader and it can write the flash successfully, but it can't verify it - it always gets butterfly_recv(): programmer is not responding.

The first program to run this way simply writes I am alive on the serial port every sec. It may be alive but it is not well. Only about one in 20 times does the whole phrase come through without error.

I'm running at 19200 baud so I would hope the internal oscillator could handle it. Anyone else got this working OK?

May 09, 2012
by BobaMosfet
BobaMosfet's Avatar

Try a slower rate with the programmer, like 9600 baud and see if the problem goes away. If so, you know it's a speed issue. If not, it's likely something else.


May 09, 2012
by rajabalu21
rajabalu21's Avatar

I think for a 8 MHz clock the error rate for 19200 baud and 9600 baud is the same. Please try 300 or 600 baud to see whether there is any improvement.



May 09, 2012
by RogerFL
RogerFL's Avatar

That sounds like a great suggestion. However, part of my motivation was the crystal wasn't working on my first PCB. Well I replaced the caps and it started working. I guess one or both was just faulty. I will try these baud rates next time I want to use the internal oscillator.

Post a Reply

Please log in to post a reply.

Did you know that microcontrollers have two different kinds of memory, program space (flash) and SRAM? Learn more...