Show Posts
Pages: [1]
1  Development / Other Software Development / Re: avr-os: multitasking library on: December 10, 2012, 01:38:51 pm
Hey

Interesting.

How much multitasking needs memory. Is it possible to check. I am not familiar with multitasking, but I know I would need it some times. So a basic question. Is it the spinlock which yields the processing to the next task. What about interrupts. And what about very long tasks where the processing is not ready when the next task begins.

Leif

Edit: By the way, I'll probably use the mega or similar.

You can check out this file which shows you some of the memory overhead:

https://github.com/chrismoos/avr-os/blob/master/os_internal.h

Each task will use 256 bytes for stack and 18 bytes for the task definition (which actually could be reduced a bit with those last 2 pointers -- start_delay_secs and delayMillis). The task stack size is configurable in the build also.

The spinlock is not used to implement multitasking. A timer interrupt is fired which will interrupt your taks's processing. If your task processing is longer than a tick then potentially a new task will be executed (and the current one is suspended).
2  Development / Other Software Development / Re: avr-os: multitasking library on: December 06, 2012, 11:31:29 am
Hello,

Nice work.
You talk about avr, any chance to have it work on a due ?
Because of low memory, I think it is difficult to use multitasking on an uno (but useful some times) easier on a mega.
But I feel it will be mandatory on the due.
Thanks for the job.

Mgth

Yeah once I get a Due I'll probably port it over there.
3  Development / Other Software Development / avr-os: multitasking library on: December 05, 2012, 08:49:42 pm
Hey all,

First off I have to say I love Arduino! Great community and a great platform. I was playing around with multitasking and I decided to release a library for multitasking on an Arduino.

Check out the code here: https://github.com/chrismoos/avr-os
I wrote a little introduction to how it works here: http://www.chrismoos.com/2012/12/05/avr-os-multitasking-on-arduino
Pages: [1]