[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: niklo
Subject: RE: [avr-gcc-list] (Newbie)2.Delay function not working as required
Date: Thu, 8 Dec 2005 09:10:26 +0100


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.



From: address@hidden [mailto:address@hidden On Behalf Of Sumeet Pal Singh
Sent: den 8 december 2005 01:53
To: address@hidden
Subject: [avr-gcc-list] (Newbie)2.Delay function not working as required


We tried to put delay in our program but it is not that reliable,
When we do
for(char i=0x00;i<100;i++)

The output which we get is not 100*100ms but something unexpected. The variable i is not used anywhere else in program. Is it that the optimisation is causing problem, if yes please tell how to remive it.


reply via email to

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