cancel
Showing results for 
Search instead for 
Did you mean: 

long time management with ST7 Lite05

jps
Associate II
Posted on June 05, 2007 at 10:34

long time management with ST7 Lite05

4 REPLIES 4
jps
Associate II
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

wolfgang2399
Associate II
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

laurent239955_stm1
Associate II
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

jps
Associate II
Posted on June 05, 2007 at 10:34

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

Thank you too woro.

egards