Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

RE: [AVR-Chat] Multitasking

2005-04-09 by Larry Barello

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

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.