cancel
Showing results for 
Search instead for 
Did you mean: 

Using For loop for Delay problem

itamar_nsu
Associate II
Posted on August 19, 2003 at 14:04

Using For loop for Delay problem

3 REPLIES 3
itamar_nsu
Associate II
Posted on August 19, 2003 at 13:06

Hi,

I'm working on the ST7LITE05 using the COSMIC C compiler.

I tried to simply blink a Led using the folowing code, but it seams that the controller doesn't getting out of the ''For'' loop.. does anyone knows why? (the ''for'' loop in just a delay loop..)

int i;

while (1) {

for(i=0;i

if (ValBit(PBDR,0)) ClrBit(PBDR,0); else SetBit(PBDR,0); //Blink The Led

}

Thanks

Itamar

Itamar_nsu@bezeqint.net

[ This message was edited by: Itamar on 19-08-2003 16:37 ]

simonharrison9
Associate II
Posted on August 19, 2003 at 13:55

Hi,

are you using the +lite option in the compiler parameters?

Without this, things can go very bad!!!

Simon
itamar_nsu
Associate II
Posted on August 19, 2003 at 14:04

Well, i didn't.. thank u very much - it works!!!

Have a nice day

Itamar

[ This message was edited by: Itamar on 19-08-2003 19:08 ]