Skip to main content
Visitor II
June 5, 2007
Question

long time management with ST7 Lite05

  • June 5, 2007
  • 4 replies
  • 729 views
Posted on June 05, 2007 at 10:34

long time management with ST7 Lite05

    This topic has been closed for replies.

    4 replies

    jpsAuthor
    Visitor II
    June 1, 2007
    Posted on June 01, 2007 at 10:28

    Hi everybody. I have to manage long time timers wit a ST7 Lite05! I need to wait a first time for 15 mn an then for 1 hour! Wich is the best way with the ST7 Lite05 to do that? Do someone have already managed such time with this microcontroler? Any idea is welcome. Regards

    Visitor II
    June 1, 2007
    Posted on June 01, 2007 at 12:49

    Hi,

    I think the most simple way is, to take the 2ms timebase period of the Lite Timer (using the interrupt flags TBF and TBIE of LTCSR) and count by software from 450.000 (6DDD0h) to 0 - to get 15min - or from 1.800.000 (1B7740h) - to get 1hour.

    In certain cases it could be advisable to implement a separate software clock system. Counting 2ms x50 to 100ms, 100ms x10 to 1s, 1s x60 to 1min and so on, you'll get 2ms-, 100ms-, 1s-, 1min- events for specific software counters.

    Regards

    WoRo

    Visitor II
    June 4, 2007
    Posted on June 04, 2007 at 13:30

    Hi,

    You would suggest to cascade the 2 timers.

    Select the Fltimer (1ms at 8MHz) as clock for the 12 bit Auto reload timer (refer to p 56 of the datasheet: description of CK1:0). So, you can get an overflow interrupt each 4s (for example), this can be select thanks to the ATR register.

    So the counter will be smaller : 225 for 15min and 900 for 1 hour.

    Best regards

    Laurent

    jpsAuthor
    Visitor II
    June 5, 2007
    Posted on June 05, 2007 at 10:34

    Thank you Laurent (merci beaucoup en fait et en Français !)

    Thank you too woro.

    egards