To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.pbforthOpen lugnet.robotics.rcx.pbforth in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / pbFORTH / 494
493  |  495
Subject: 
Re: somewhat off topic, but...
Newsgroups: 
lugnet.robotics.rcx.pbforth
Date: 
Fri, 17 May 2002 15:10:10 GMT
Viewed: 
2520 times
  
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
imply that languages are chosen by popularity instead of technical merit,
but that's another thread...

pbForth seems to be well written, and is certainly well supported by Mr.
Hempel.  If you've never used Forth before, be prepared for a STEEP learning
curve.  I know a half dozen languages, but none of them are anything like
Forth.  If you make an honest effort to learn it though, you will probably
find it worth your time.

The compiler is part of the language and is loaded on the RCX.  The only
thing you need beyond that is a terminal emulator (and a way to download the
firmware).

Check it out.

David

In lugnet.robotics.rcx.legos, Ralph Hempel writes:
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 is in Reply To:
  RE: somewhat off topic, but...
 
Kenneth, (...) I wrote it so I'm biased... (...) 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: (URL) The newest version 2.1.3 has an (...) (23 years ago, 15-May-02, to lugnet.robotics.rcx.legos, lugnet.robotics.rcx.pbforth)

10 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