Yahoo Groups archive

AVR-Chat

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

Message

RE: [AVR-Chat] Re: WinAvr or CodeVision, which one is more public?

2008-01-22 by Philippe Habib

And that is the core of multi tasking real time code.  The standard for fast
is as fast as you need to go in order to get all the stuff you need done on
time.

If you're inside a laser printer and the mirror is coming around you'd
better be ready so fast means one thing.  In an instrument I've worked on,
fast meant that I had to have a piece of data from a sensor updated every
100ms.  On another instrument, it was 300 channels of ADC every 100ms.  In
each case you just need to structure your code so that the stuff that MUST
happen on time gets done and the other stuff shares the leftover time.  The
RTOS takes care of that for you so that you don't have to time everything in
a main loop to make it come out right.

-----Original Message-----
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Behrooz
Sent: Tuesday, January 22, 2008 8:44 AM
To: AVR-Chat@yahoogroups.com
Subject: [AVR-Chat] Re: WinAvr or CodeVision, which one is more public?

What might be a standard for 'fast'? If Gosubs take one milisecons is 
it fast? If the whole process takes less tha 0.1 Sec then what is the 
difference if you break it into 1000 piececs or 10? Doesnt it make 
you work harder, if you play too much with ISRs? 

Behrooz

--- In AVR-Chat@yahoogroups.com, "David VanHorn" <microbrix@...> 
wrote:
>
> > U talked of RTOS. Never heared of it before, but my MCU needed to
> > control RH, light level and temperature real time and show them on
> > LCD, so I thought and then I made for myself a sort of virtual 
multi-
> > tasking procedure, for example:
> >
> > Do
> >  Gosub v
> >  Gosub w
> >  Gosub x
> >  Gosub y
> >  Gosub z
> > Loop
> > End
> >
> 
> This is the guts of a cooperative multitasker.
> The trick is to divide up the tasks so that none of them really do
> very much, and they don't do anything if they don't have to.
> Then take your time-critical I/O and handle that in ISRs, just
> buffering the data into ram and letting the system deal with the
> buffered data.
> 
> In one system I'm working on, there's an ISR to catch serial data 
from
> a GPS, putting that in a serial input buffer.
> One of the routines in the main loop scans that buffer for a valid
> NMEA sentence.
> Another routine takes a valid sentence from that buffer and puts it 
in
> another buffer for parsing.
> Another parses any sentences that arrive.
> ...
> ...
> ...
> and so on.
> 
> Each does very little, and the idea is to return to main as fast as 
possible.
>




 
Yahoo! Groups Links






-- 
No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.19.9/1237 - Release Date: 1/22/2008
11:04 AM

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.