Skip to main content
Visitor II
May 13, 2003
Question

ST7 assembler delay 3 sec

  • May 13, 2003
  • 3 replies
  • 818 views
Posted on May 13, 2003 at 08:19

ST7 assembler delay 3 sec

    This topic has been closed for replies.

    3 replies

    Visitor II
    May 2, 2003
    Posted on May 02, 2003 at 13:15

    Hello,

    how can I create a delay of 3 seconds?

    tia

    Christophe
    Visitor II
    May 8, 2003
    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
    Visitor II
    May 13, 2003
    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 ]