1 Mar 10:14 2006
AW: Fast Timers
Oliver Ludwig <oliver.ludwig <at> i2se.com>
2006-03-01 09:14:47 GMT
2006-03-01 09:14:47 GMT
I assume you get Jean's Embedded Building Blocks book. Look at bol.de or amazon for it. The book describes several usefull modules, including a software timer module. They've some advantages against the common delay. See more in the book, please.
If you want to use a hardware timer, just set up your LCD task waiting on a refresh event (event flags). Config your hardware timer that way it fires every 200ms a timer interrupt. The timer interrupt ISR should signal a refresh event (event flag) to the refresh task.
However, like in real life, on a RTOS there are many roads leading to rome
Try to avoid delay/sleep in your comm tasks. Implement them event driven (posting semaphore or event flags). LCD or keyboard tasks can be implemented with a delay mechanism. They are usually some kind of unimportant, compared to communication tasks.
Von: MicriumNewsGroup <at> yahoogroups.com [mailto:MicriumNewsGroup <at> yahoogroups.com] Im Auftrag von andreas_hageleHi again.
Gesendet: Mittwoch, 1. März 2006 07:16
An: MicriumNewsGroup <at> yahoogroups.com
Betreff: [MicriumNewsGroup] Fast Timers
Another questions on the timers in uC/OS.
I looked at the ARM for IAR port which also has code in there to run a
Looking at the delays required for the LCD I see that the OSTimeDly()
function is used. However with the timer tick usually being 1-50ms
these delay will end up being much longer than needed (ms instead of us).
It does all run fine, but the update of a simple 2 line LCD might take
It's not a big thing, but how could that been done a bit nicer?
I could employ a dedicated hardware timer for these kind of short
delays. Having Semaphores on the timer complete would allow uC/OS to
carry on with other tasks while waiting and then switch back to the
Or the LCD task could have a loop delay and run on lowest priority. So
it might not run a lot but when it does it will do the display faster.
Or is there some sort of a generic approach in using fast timers
within the uC/OS environment?
YAHOO! GROUPS LINKS
- Visit your group "MicriumNewsGroup" on the web.
- To unsubscribe from this group, send an email to:
MicriumNewsGroup-unsubscribe <at> yahoogroups.com
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.