Frequency: My Atmel runs at 1MHz despite the 8MHz quartz

Hi all,

I bought a 28 Pin AVR Development Board http://www.sparkfun.com/commerce/produc … ucts_id=29.

It perfectly works BUT the Atmega8 runs at 1MHz instead of 8MHz.

It seems the 8MHz quartz has no effect.

Is there anything to configure (hardware or software) ?

Has the quartz to be replaced ?

How can I check it works or not ?

Thanks a lot !

Guillaume

Galmiza:
Hi all,

I bought a 28 Pin AVR Development Board http://www.sparkfun.com/commerce/produc … ucts_id=29.

It perfectly works BUT the Atmega8 runs at 1MHz instead of 8MHz.

It seems the 8MHz quartz has no effect.

Is there anything to configure (hardware or software) ?

Has the quartz to be replaced ?

How can I check it works or not ?

Thanks a lot !

Guillaume

It runs from the internal RC oscillator by default. You need to configure it for the crystal oscillator.

Leon

There is a fuse bit (CLKDIV) that is often (always?) set on AVRs from the factory. If set, the clock is divided by 8 and thus an 8MHz clock gives you a 1MHz internal clock. Make sure that fuse bit is not set.

Thank you very much.

You were right,

From the datasheet:

The default setting of CKSEL3…0 results in internal RC Oscillator @ 1MHz.

I read about the fuse bit but I cannot find how to change them.

I actually use a “default” makefile compatible with AnyEdit, but I could not find anything inside related to fuse bit.

Here is the makefile (I renamed it as a text file so that it appears as text in your browser).

http://galmiza.free.fr/FTP/Makefile.txt

What line should I change ?

Thanks a lot

Guillaume

fuse bits have nothing to do with code. they are changed in your Flash downloader software (ex: AVR Studio, which presents them as checkboxes)