headerImage

Here's what everyone has been asking for - a FAQ for pbForth. This is a constantly evolving document so check back here every once in a while for new additions. Here are a few other places you can check out in case you don't find what you need here.

I try to answer email as quickly as I can, but I prefer to handle pbForth questions using the LUGNET pbForth newsgroup so that everyone can benefit from everyone elses experience.

Table of Questions

  1. What exactly is pbForth?
  2. Where can I get the latest distribution?
  3. What else do I need to use pbForth?
  4. How do I load pbForth into my RCX?

Table of Answers

  1. What exactly is pbForth?[Top]

    pbForth is replacement firmware. The standard firmware from LEGO is loaded into the brick when you set it up for development with the graphical interface. This works very well for most of the applications you are likely to want to build. For users that want more control over the RCX, or more variables, or the ability to log 2000 sensor readings and do sophisticated control algorithms, a more powerful environment is needed.

    Enter pbForth - which replaces the standard firmware from LEGO. By loading pbForth, you do not affect the internal electronics of the RCX brick - you are just putting different operating software into the volatile RAM memory. To get rid of pbForth, just remove the batteries.

    pbForth can be thought of as an interactive scripting language. Once the firmware is loaded into the brick, you can either type your pbForth programs or send them as ASCII files using a standard terminal emulator. This is a very powerful concept since you can literally try your code out and debug it in real time. The brick compiles the code for you. You don't need to learn about or install any compiler packages or worry about complex operating systems. You will need to learn pbForth, but that's pretty easy with the wealth of on-line information available.

  2. Where can I get the latest distribution?[Top]

    The latest distribution of pbForth is just a click away. To keep informed of any significant changes to pbForth or this website, just send email to subscribe.

  3. What else do I need to use pbForth?[Top]

    You will need to have some way of putting the firmware in the brick, and then a terminal emulator program to communicate with it. At one point, I was doing development on a TclTk GUI tool to upload images and do simple terminal emulation. Too late, I have realized that using off-the-shelf tools is better because I don't have to actually write them. Older versions of pbForth would "double echo" characters sent to the brick, so that it was almost impossible to read an interactive session. The current version makes the double echo optional. With this in mind, here are the recommended extra tools for pbForth.

    Firmware Uploader
    I highly recommend Dave Baum's NQC program for uploading the pbForth image to the RCX. It is available for just about every platform you can imagine. Dave is also hinting at providing a family of standalone firmware upload tools using newly discovered high-speed techniques. I no longer package my GUI tool and do not plan on enhancing it any further. Dave has spent alot of time getting NQC into a polished product, and you can always use NQC to control your robots too!
    Terminal Emulator
    You can use whatever terminal program you are familiar with. Win9x ships with HyperTerminal - and it worked fine for a while but I have been having a lot of grief with it lately. I am currently using CRT from VanDyke Software. This is a solid piece of software for the Win9x platform that allows ActiveX scripting - so I might just have some neat applications later. For Mac and Linux users, you will want to check out TUCOWS for shareware programs that might fit the bill. Search for keywords like "telnet" and "terminal emulation" and you'll probably find something to your liking. Make sure that the package you pick supports ASCII file uploads and serial port communications.
    If any Mac or Linux users come across a decnt terminal emulator that you feel should be included here, just send me an email and I'll get it listed on this page.
    Forth Learning Materials
    pbForth is an interactive language, so grab a cup of tea or coffee and settle down in front of your computer. Check out the #error - glossary forthOnlineResources not found to find out more about Forth and RCX specific extensions.
  4. How do I load pbForth into my RCX?[Top]

    I am no longer supporting the TclTk-based firmware uploader and terminal emulator for pbForth. I learned too late that there are better packages out there. Older versions of pbForth would echo every character twice, making interactive use almost impossible. The current and future versions make the echo an optional setting.

    For loading the firmware, I suggest Dave Baum's NQC program. I'm only familiar with NQC under Win9x, so I'll describe the simple procedure right here. Just type:

    nqc -firmware pbforthxxx.srec

    where

    pbforthxxx.srec

    is from the current version of pbForth you have downloaded. You will see a series of little dots on your screen telling you that NQC is doing its thing, and the RCX will increment its display to around 1200 or 1300 until everything is done. NQC might complain about not getting a reply from the RCX at the end - that's OK. The RCX will display "4th" on the LCD screen. You'll have to use your imagination, the "t" is hard to do on a 7-segment display!

    That's all there is to it. Check the excellent NQC documentation to make sure that you are using the right serial port on your PC.The NQC help files will provide all the information you need to set different ports, etc.