I wrote a small RTOS that is available at www.yahoogroups.com/avrx and on my website (but really out of date) www.barello.net/avrx that works with GCC. It is written in assembly and very small, but somewhat difficult to get up and running. Most (but not all) of my current projects use a foreground loop with Finite State Machine (FSM) tasks and a high speed timer interrupt that increments counters or runs additional FSM that need precise periodic execution (e.g. motor or sensor control/input tasks, filtering, etc) That structure is pretty simple and works well for just about everything. The top level foreground loop typically runs 100k/sec or more when nothing is happening, although it can be blocked by whatever time it takes to run the interrupt stuff. Oh, yeah, re-enable interrupts in the timer routine so you can run fast & slow stuff nested (make sure you can't re-enter the fastest stuff or you will be in trouble!). Cheers! -----Original Message----- From: arhodes19044 [mailto:spamiam@comcast.net] Sent: Friday, April 08, 2005 7:03 PM To: AVR-Chat@yahoogroups.com Subject: [AVR-Chat] Multitasking Are there any C templates to perform multitasking? Or do I have to use a timer interrupt to try to do some basic time- slice activity? Actually, I can have timer interrupts to perform certain functions, so true multitasking is not really necessary. I was just interested if such exists. For stuff like spawn() to run concurrently. -Tony Yahoo! Groups Links
Message
RE: [AVR-Chat] Multitasking
2005-04-09 by Larry Barello
Attachments
- No local attachments were found for this message.