I was upto use the UART of my Atmega8 but when i looked at the formula for UBBR, it asks F_CPU(frequency). I have made my own board and havent connected any external clock so what is the frequency my atmega8 runs on?

Further when i looked up to datasheet it says that it has upto 16Mhz, So am i running it on 16 Mhz or what?


2 Answers 2


Many AVRs (like ATmega8, ATmega16, ATmega32) have internal RC oscillator. It is calibrated for 1,2,4 or 8 MHz. It has +-3% accuracy. Frequency of oscillator gets affected by VCC and temperature. (source: http://www.elecrom.com/2007/10/15/configuring-avr-fuse-bits-for-clock-selection/ )


From the factory the ATmega8 comes with its CKSEL fuses programmed as 0b0001, which means that it uses its internal RC oscillator running at 1MHz. See the "System Clock and Clock Options" section of the ATmega8 datasheet for details.

  • \$\begingroup\$ Use your programmer to read the fuse byte(s), then refer to the datasheet to determine what is the clock frequency. \$\endgroup\$
    – kabZX
    Sep 1, 2015 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.