Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: delay time is not reliable

2012-08-31 by englsprogeny1

Hi John,

I'm using an external makefile  (my own).
This means that I don't need to set processor speed in Project|Config Options
Right?

I see that processor speed is greyed out (in Config Options|General)

Also, I see in Project Properties|Config Options|custom Options: [all files] that it shows DF_CPU=7372800UL

This processor speed is defined in a file called global.h
#define F_CPU          7372800 


Yes, the delay function call is:

_delay_ms(5);


This is a new board and a new way of building for me.

Today I'm going to try rebuilding (using the make command as I have always done) and run on my (known working) ATMega8 board.  I will program it using ISP, run and measure the timing.


I may also try this on my ATMega128 board.

Thanks John
David


--- In AVR-Chat@yahoogroups.com, John Samperi <samperi@...> wrote:
>
> At 03:26 PM 31/08/2012, you wrote:
> >2.  F_CPU is set correctly
> >#define F_CPU          7372800
> 
> But is this what you have in the project settings? _delay_ms is pretty
> accurate if it has the correct information.
> 
> Are you using your own makefile or the Studio generated one?
> 
> 
> 
> Regards
> 
> John Samperi
> 
> ********************************************************
> Ampertronics Pty. Ltd.
> 11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
> Tel. (02) 9674-6495
> Website  http://www.ampertronics.com.au
> *Electronic Design * Custom Products * Contract Assembly
> ********************************************************
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.