[Top][All Lists]

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

Re: [avr-gcc-list] (Newbie)2.Delay function not working as required

From: Sumeet Pal Singh
Subject: Re: [avr-gcc-list] (Newbie)2.Delay function not working as required
Date: Thu, 8 Dec 2005 12:29:56 +0000

The delay function is the regular one from <avr/delay.h>
I havce not written the delay.

the thing is that
//Write this 100 times
gives a delay of 100*100ms.


for(char i=0;i<100;i++)

does not, that is where the problem is coming.

On 12/8/05, Alexei Chetroi <address@hidden> wrote:
On Thu, Dec 08, 2005 at 09:10:26AM +0100, niklo wrote:
> Date: Thu, 8 Dec 2005 09:10:26 +0100
> From: niklo <address@hidden>
> To: 'Sumeet Pal Singh' < address@hidden>, address@hidden
> Subject: RE: [avr-gcc-list] (Newbie)2.Delay function not working as required
>    Why don't you use the avr-libc delays, _delay_ms()?
>    I have myself used it in a for-loop to produce long s-range delays in some
>    project. For this long delays I guess though you should use timers and
>    interrupts.

  Also check application note AVR133: Long Delay Generation Using the
AVR Microcontroller on

  Best wishes

Alexei Chetroi

Smile... Tomorrow will be worse. (c) Murphy's Law

reply via email to

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