Shop OBEX P1 Docs P2 Docs Learn Events
How about a 'Forth Stamp'? — Parallax Forums

How about a 'Forth Stamp'?

KotobukiKotobuki Posts: 82
edited 2013-12-29 17:23 in General Discussion
I was wondering if it would be possible to create a Stamp format PIC with embedded FORTH? Sorta like a BASIC Stamp 2 only it would be a 'FORTH Stamp'.

Just a thought... (Of course it is early in the morning, and I am not yet properly caffeinated :-)

Best,

Joe

Comments

  • mindrobotsmindrobots Posts: 6,506
    edited 2013-12-20 06:34
    Just take a Propeller mini and load it up with one of the Propeller Forths - unless you particularly want a Stamp format for some reason. Then just make a stamp format Propeller board and load it up with one of the Forths. Why use a PIC?

    Why ask us about Forth for a PIC? Isn't there a forum or two for PIC people? :smile:
  • davejamesdavejames Posts: 4,047
    edited 2013-12-20 08:37
    Kotobuki wrote: »
    I was wondering if it would be possible to create a Stamp format PIC with embedded FORTH?


    Sounds like these guys are on the same path:

    https://groups.google.com/forum/#!topic/comp.lang.forth/voQiGZ5vo7Q
  • KC_RobKC_Rob Posts: 465
    edited 2013-12-24 12:29
    Makes sense if you want something in a Stamp format, though it doesn't have to be PIC. It's easy now to get a robust Forth running on the Propeller, and Forth development for Propeller is very active. One has several "flavors" to choose from as well.

    If, for whatever reason, the target has to be PIC (or for that matter AVR), then FlashForth is -- by far -- your best bet.
  • Martin_HMartin_H Posts: 4,051
    edited 2013-12-25 14:02
    I doubt there would be a big enough market for Parallax to make a Forth specific product. But there are a number of 24 pin modules that are roughly in the Stamp form factor. Besides Parallax 's Prop mini, AmForth on an Arduino mini or Pololu baby Orangutan would be almost what you are looking for. Flash Forth sounds similar, but AmForth seems more popular among AVR users. I've mounted a Pololu baby orangutan on a Board of Education by not connecting the motor outputs to the board.
  • KC_RobKC_Rob Posts: 465
    edited 2013-12-26 09:59
    Martin_H wrote: »
    I doubt there would be a big enough market for Parallax to make a Forth specific product.
    I'm not so sure. There does seem to be a resurgence of interest in Forth (as well for functional programming languages, by the way). Perhaps with a well-designed/-supported product and the right marketing...???
    Flash Forth sounds similar, but AmForth seems more popular among AVR users.
    FlashForth started out, I believe, as a Forth for PICs (PIC18s). But the AVR version follows closely and has some features (eg, multitasking) for doing real-world embedded work that AmForth does not. I have an UNO board running FlashForth on my desk now; so far I've been impressed.

    Arduino having been mentioned, I should also add that FIGnition would be another example of something along these lines.
  • 4x5n4x5n Posts: 745
    edited 2013-12-26 23:41
    Silly question from a non-forth user. Given the few parts required to make a prop "go" and the number of existing versions of forth available for the prop wouldn't that be the way to go?
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-12-27 03:30
    Why and Why not?

    First.. the NOT.
    Well, the BasicStamp or any old PIC won't work. Forth generally requires about 32K of dictionary space to work comportably. The Propeller provides 32K of RAM, and dictionaries can be extended into huge spaces via adding an SDmicro card interface.

    Second.. why the Propeller.
    While you can use an 8bit or 16bit processor with a 32bit RAM space, the Propeller has 8 parallel CPUs that are all 32bit, and an 80Mhz clock. It just fits better by offering more than the other Forth on a microcontroller at this point.

    The real power of your use of Forth on a microprocessor comes into play when you you can have Forth words start another Cog, run a task to completion, and then free the Cog for other tasks as they come along. On a single CPU, you can't start two or three unrelated tasks without either waiting for one to finish before the next one, or having to figure out a rather complete threading support that will slow things down.

    In sum, the Propeller just happens to be about the best fit for microcontroller Forth... a lot can happen, and fast.
  • KC_RobKC_Rob Posts: 465
    edited 2013-12-27 11:19
    In sum, the Propeller just happens to be about the best fit for microcontroller Forth... a lot can happen, and fast.
    Spot on (P1 makes handling multiple tasks so much easier). I'm sure this explains why there is more and better Forth support for Propeller than any other microcontroller right now; something that will likely remain so for a while, assuming someone doesn't produce a true stack-based micro.
  • WBA ConsultingWBA Consulting Posts: 2,934
    edited 2013-12-27 14:00
    My PropBSC Propeller Module that has a BASIC Stamp compatible pinout would probably be a drop in for the original request, but unfortunately, the lack of interest put that project into the mothball fleet.
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-12-29 09:42
    KC_Rob wrote: »
    Spot on (P1 makes handling multiple tasks so much easier). I'm sure this explains why there is more and better Forth support for Propeller than any other microcontroller right now; something that will likely remain so for a while, assuming someone doesn't produce a true stack-based micro.

    I don't know if I'd go that far, the AmForth community has a very large and active population, if you can work with the ATmegs its a very good choice.

    For multitasking, forth supports a software round-robin and works very well, and requires very little overhead; but the developer has to be aware of the mechanism for surrendering control. Its very simple and elegant and works well as long as we don't try to put 10 lbs or material into a 5 lb bag.

    For size, the 8 bit forths typically needed 4k to make a "useful" kernel, depending on who you asked. For some folk 4k is fine, for others 4 gig seems to be too little.

    The prop forths are more active because the prop is newer. The older forths on the older chips are less active because they are very well defined and well known, and -kernel- development has taper off. Once your forth gets "comfy" on your new favorite chip, the kernel development tends to slow down, as we concentrate on app development. Folks that use the 6502 or 6809 or whatever just use them, and stock forths for these and most any other chips are just out there.

    Maybe a forth "stamp" simply isn't necessary per se, since any prop can run forth.
  • KC_RobKC_Rob Posts: 465
    edited 2013-12-29 17:23
    Folks that use the 6502 or 6809 or whatever just use them, and stock forths for these and most any other chips are just out there.
    Except there isn't much in the way of new design work going on with those or similarly aged chips.

    Google returns 28,500 results for Atmel AVR Forth
    Google returns 39,500 results for Parallax Propeller Forth

    I realize they are not definitive proof of anything (and contain much rubbish), but those results give some sense of how Forth support on Propeller stacks up (yes, pun!). All things considered, it compares disproportionately well.
Sign In or Register to comment.