2007-06-05 01:34 AM
long time management with ST7 Lite05
2007-06-01 01:28 AM
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
2007-06-01 03:49 AM
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 WoRo2007-06-04 04:30 AM
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 Laurent2007-06-05 01:34 AM
Thank you Laurent (merci beaucoup en fait et en Français !)
Thank you too woro. egards