cancel
Showing results for 
Search instead for 
Did you mean: 

ST7 assembler delay 3 sec

chill_just_chill
Associate II
Posted on May 13, 2003 at 08:19

ST7 assembler delay 3 sec

3 REPLIES 3
chill_just_chill
Associate II
Posted on May 02, 2003 at 13:15

Hello,

how can I create a delay of 3 seconds?

tia

Christophe
sjo
Associate II
Posted on May 08, 2003 at 16:43

Best method is to use the timer in output compare mode, if you download the ST7 library there is an example of an RTC with the timer.

Hope this helps

SJO
itsmejatinus
Associate II
Posted on May 13, 2003 at 08:19

Another way is to call function like-

void delay(void)

{

unsigned int a,b,c;

for (a=0xffff;a>=0;a--)

{

for ( b=0xffff;b>=0;b--)

{

for (c=0xffff;c>=0;c--);

}

}

}

You can set the value of a,b,c or add another variable to according to delay time & cpu clock frequency.

[ This message was edited by: Ranjeet on 13-05-2003 12:12 ]