To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2574
2573  |  2575
Subject: 
RE: somewhat off topic, but...
Newsgroups: 
lugnet.robotics.rcx.legos, lugnet.robotics.rcx.pbforth
Date: 
Wed, 15 May 2002 14:42:45 GMT
Reply-To: 
<RHEMPEL@BMTSihatespam.COM>
Viewed: 
3670 times
  
Kenneth,

anyone tried pbforth ?

I wrote it so I'm biased...

im doing a comparison between the different possibilities here
and looking at pbforth i was somewhat intrigued, until i discovered that
you cannot multitask(more than 1 thread of execution). anyone here tried
pbforth and can confirme that ?

I'll get to the ttasker in a minute, but pbForth is the only alternative
firmware with native support for SERVOS if you use the simple circuit
I developed here:

<http://www.hempeldesigngroup.com/lego/servos/index.html>

The newest version 2.1.3 has an undocumented (for now) hook into the 1msec timer
that allows you to implement a very crude multitasker. In fact, this model
is used frequently in very small automotive applications.

The idea is as follows:

1. At the 1msec tick, do all the regular RCX stuff and then call the
   mutli-tasker hook IF WE HAVE NOT ALREADY CALLED THE HOOK. Just before
   we call the hook, set a flag that indicates we are about to do so.

2. Within the hook, do all the stuff we need to. You can implement
   cooperative multitasking by performing some tasks evey 2 or 4th
   or 100th time through the loop.

3. If the 1msec tick is called again, the hook won;t be entered because
   of the flag.

It's a bit complicated, and I really am planning to add atutorial on this
very soon.

Although multitasking is neat, most of our simple robotics apps don't
really need it. The problem with pre-emptive taskers is that you generally
need a separate stack for each task. The single stack cooperative tasker
I'm proposing is a bit easier to understand.

Ill post a note here when the new tutorial is available.

Cheers, Ralph

--------------------------------------------------------------------
Check out pbFORTH for LEGO Mindstorms at:
<http://www.hempeldesigngroup.com/lego/pbForth>

Buy "Extreme Mindstorms: an Advanced Guide to Lego Mindstorms"
<http://www.amazon.com/exec/obidos/ASIN/1893115844/hempeldesigngrou>
--------------------------------------------------------------------
Reply to:      rhempel at bmts dot com
--------------------------------------------------------------------



Message has 1 Reply:
  Re: somewhat off topic, but...
 
Repost to proper newsgroup... ===...=== I'm NOT biased because I DIDN'T write the thing... Forth is a wonderful language that has a proven track record. I don't use it in my job simply because management has never heard about it. I don't mean to (...) (23 years ago, 17-May-02, to lugnet.robotics.rcx.pbforth)

Message is in Reply To:
  somewhat off topic, but...
 
anyone tried pbforth ? im doing a comparison between the different possibilities here and looking at pbforth i was somewhat intrigued, until i discovered that you cannot multitask(more than 1 thread of execution). anyone here tried pbforth and can (...) (23 years ago, 15-May-02, to lugnet.robotics.rcx.legos)

10 Messages in This Thread:





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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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