To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 4698
4697  |  4699
Subject: 
Re: Reading sensors at equal intervals.
Newsgroups: 
lugnet.robotics
Date: 
Mon, 26 Apr 1999 18:39:01 GMT
Viewed: 
1552 times
  
S. Crawshaw <sc10003@eng.cam.ac.uk> wrote:
How does the timing of tasks work? I seem to recall reading somewhere that
the firmware executes the tasks in sequence - is there any timing element
to this, or does it just do task 1, then immediately onto task 2, etc, and
back to task 1 when it's done. (I'm hoping that it starts each task at a
predictable time...) Or have I got this completely wrong?!

IIRC, it preferentially executes a single instruction received from the IR
connection, otherwise takes the next instruction from the next task and
executes that instead.

Alternatively, if leave NQC etc behind and go to "H8-land", is it possible
to use LegOS or similar to generate a software interrupt at regular
intervals?

Probably.  I don't think LegOS supports (what I'd call) a software
interrupt at regular intervals, but it does have preemptive multitasking
that switches on 20 ms intervals, and you can make a task have such high
priority that it is guaranteed to run at the start of every 20 ms, so close
enough.  And you can probably tweak the source too to change the 20 ms to
something else.

Failing that, I'm willing to write in pure H8 assembly language if
necessary (although I don't really want the hassle of setting up the H8
stuff for gcc)

There is a hassle in setting up gcc (or egcs?), especially if you don't
have a Unix box, but there are instructions on the net for doing this,
and in my opinion it's well worth it once you've got over the setup hurdle.

-Kekoa



Message is in Reply To:
  Re: Reading sensors at equal intervals.
 
(...) <snip> (...) That looks like a "no" then... How does the timing of tasks work? I seem to recall reading somewhere that the firmware executes the tasks in sequence - is there any timing element to this, or does it just do task 1, then (...) (26 years ago, 26-Apr-99, to lugnet.robotics)

25 Messages in This Thread:











Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR