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

2005-12-08 Thread Joerg Wunsch
Alexei Chetroi <[EMAIL PROTECTED]> wrote: > I think that compiler optimize your cycle away, since variable i > is not used in its body. It is not allowed to optimize it away due to the function call. -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/

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

2005-12-08 Thread Alex Wenger
Hi, > for(char i=0;i<100;i++) > delayma(100); you should try: for(char i=0;i<100;i++) { delayms(100); } ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

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

2005-12-08 Thread Dave Hylands
Hi Sumeet, On 12/8/05, Sumeet Pal Singh <[EMAIL PROTECTED]> wrote: > The delay function is the regular one from > I havce not written the delay. Since you're not showing us the actual code that you used (since the delay function inside is called _delay_ms not delayma) and since you've said th

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

2005-12-08 Thread Christopher X. Candreva
On Thu, 8 Dec 2005, Sumeet Pal Singh wrote: > We tried to put delay in our program but it is not that reliable, > When we do > for(char i=0x00;i<100;i++) > delayms(100); I've done almost all my AVR programming using AvrX, a simple real-time OS developed by Larry Barello (Hi Larry!), and free fro

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

2005-12-08 Thread Alexei Chetroi
On Thu, Dec 08, 2005 at 12:29:56PM +, Sumeet Pal Singh wrote: > Date: Thu, 8 Dec 2005 12:29:56 + > From: Sumeet Pal Singh <[EMAIL PROTECTED]> > Subject: Re: [avr-gcc-list] (Newbie)2.Delay function not working as required > >The delay function is the regular one f

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

2005-12-08 Thread Jahagirdar Gopal-AGJ005
08, 2005 6:23 AM To: avr-gcc-list@nongnu.org Subject: [avr-gcc-list] (Newbie)2.Delay function not working as required   Hi We tried to put delay in our program but it is not that reliable, When we do for(char i=0x00;i<100;i++) delayms(100); The output which we get is not 100*100ms but someth

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

2005-12-08 Thread Sumeet Pal Singh
roi <[EMAIL PROTECTED]> wrote: On Thu, Dec 08, 2005 at 09:10:26AM +0100, niklo wrote:> Date: Thu, 8 Dec 2005 09:10:26 +0100> From: niklo <[EMAIL PROTECTED]>> To: 'Sumeet Pal Singh' < [EMAIL PROTECTED]>, avr-gcc-list@nongnu.org> Subject: RE: [avr-gcc-list] (Newb

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

2005-12-08 Thread Alexei Chetroi
On Thu, Dec 08, 2005 at 09:10:26AM +0100, niklo wrote: > Date: Thu, 8 Dec 2005 09:10:26 +0100 > From: niklo <[EMAIL PROTECTED]> > To: 'Sumeet Pal Singh' <[EMAIL PROTECTED]>, avr-gcc-list@nongnu.org > Subject: RE: [avr-gcc-list] (Newbie)2.Delay function not working

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

2005-12-08 Thread niklo
Behalf Of Sumeet Pal Singh Sent: den 8 december 2005 01:53 To: avr-gcc-list@nongnu.org Subject: [avr-gcc-list] (Newbie)2.Delay function not working as required   Hi We tried to put delay in our program but it is not that reliable, When we do for(char i=0x00;i<100;i++) delayms(100); The out

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

2005-12-07 Thread James Washer
I think you should post your delayms() timer code here.. I'm sure someone will be able to help, On Wed, 7 Dec 2005 18:38:57 -0800 (PST) Parthasaradhi Nayani <[EMAIL PROTECTED]> wrote: > Hello, > What is the code for delayms function? If you have a doubt that > optimisation is causing a pro

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

2005-12-07 Thread Parthasaradhi Nayani
Hello, What is the code for delayms function? If you have a doubt that optimisation is causing a problem,  you could disable optimisation, recompile and check the output (delay time).Regards Nayani Sumeet Pal Singh <[EMAIL PROTECTED]> wrote: Hi We tried to put delay in our program but it

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

2005-12-07 Thread Sumeet Pal Singh
Hi We tried to put delay in our program but it is not that reliable, When we do for(char i=0x00;i<100;i++) delayms(100); 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 pl