avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] sample code for ATmega48?


From: Matthew MacClary
Subject: Re: [avr-chat] sample code for ATmega48?
Date: Fri, 1 Jun 2007 11:02:01 -0700

On 6/1/07, address@hidden <address@hidden> wrote:
> #undef F_CPU
> #define F_CPU 20000000UL /* 20MHz */

My understanding is that, by default, the ATmega48 will run at 1MHz.
To get proper timing, should I change the value of F_CPU to 1000000UL?

Yes, you should make that change if you want to run at 1MHz, otherwise
the delay will be 20 times longer than expected.

-Matt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]