Hi! I'm just starting to learn about Forth... [RUN AWAY!]
So much of it seems tied to the concept of a user interface...
but I was thinking of using it for robotic control where there
just isn't any such interface. I don't even want any run-time
interpretation, just compiled executable code.
I've heard that Forth is great for microcontrollers, but are
they expected to have an ASCII terminal attatched? What gives?
I'd like to see a Forth compiler for PIC microcontrollers, but their
Harvard architecture would probably require some external serial RAM
for stack space. I'm thinking that if I use multiple RAMs on separate
two-wire busses I could do stack operations (on different stacks) in
parallel, so I might be able to pipeline the words much like the way
that the PICs pipeline their instructions.
Yes, in fact, Forth is a nice compact language and lends itself easily to
microcontroller applications. The larger PIC devices (17C4x) probably have
large enough register files to support a decent stack in the register file,
the smaller ones do not. The serial RAM idea for the stack is, however, also
viable. I am contemplating designing a Forth interpreter for the 17C4x
myself, which would take its instruction stream from an attached serial
EEPROM and keep the stack internally. I believe that such a thing could
run at a nice clip, probably faster than a PIC-based BASIC system. If the
time to fetch the Forth instructions from the serial EEPROM is not counted,
we're probably talking on the order of 4 PIC instruction cycles per Forth
instruction. As far as user interfacing, I don't envision my PIC Forth
system as having a monitor. It's not needed for typical microcontroller
applications. I suppose, though, the serial EEPROM could be replaced with
or augmented by a serial monitor.
Benjamin A. Tober - -WBRS FM - 100.1Mhz in Waltham,Ma.
email: cs.brandeis.edu -FreeLiveMusic Four Times Weekly tober
"Are you a truck?" -24hr/day all-genre diversity
Benjamin Tober <MITVMA.MIT.EDU> wrote: PICLIST
> Yes, in fact, Forth is a nice compact language and lends itself
> easily to microcontroller applications. The larger PIC devices
> (17C4x) probably have large enough register files to support a
> decent stack in the register file, the smaller ones do not.
In fact, there already IS a Forth implementation for the 17C4x; it's
available from the Microchip BBS.
Andrew Warren - ix.netcom.comfastfwd
Fast Forward Engineering, Vista, California
More... (looser matching)
- Last day of these posts
- In 1996
, 1997 only
- New search...