Shop OBEX P1 Docs P2 Docs Learn Events
Ready to go Forth, but........... — Parallax Forums

Ready to go Forth, but...........

LoopyBytelooseLoopyByteloose Posts: 12,537
edited 2011-10-08 01:21 in Propeller 1
With finally figuring out why my RS-232 chip wasn't working (forgot to solder the input and output on the DB-9 side), I now have a working dumb terminal with VT100 emulation.

So I am ready to load Propeller Forth 4.6 into another Propeller Proto Board for dedicated Forth use.

I know I didn't need the MAX232 for this and will likely by-pass it with direct TTL from one Propeller to the next. But I am wondering a bit about how to do so.

On the Propeller Forth platform, do I just reset the loaded Propeller and use Pins 30 and 31 (with a ground between the two boards of course)? All the documentation I have read seems to support only using a PC with a software emulation of a terminal, called TeraTerm.

I want to be able to have the independent dumb terminal for a variety of reasons and PockeTerm just fit the bill so well. If you need to find out what I am talking about, try www.BrielComputers.com.

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2011-10-04 03:53
    It's always a good idea to insert some low value resistors in series with the signals that run off board. I prefer values of 220R or 1K and another thing too is that when the Prop is reset the transmit line floats so there could be a little garbage coming through on the terminal. If you can just add 10K pullups on the transmit and also the receive in case the terminal is disconnected. You will find that the 232 chips have this pullup (and pulldown) built in. Here's what I do:

    direct coms.png
    754 x 212 - 15K
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-10-04 04:04
    Loopy,

    Peter's right on target! PropForth is just lonely and wants someone to talk to on pins 30 and 31.

    From the Multi-Prop Test System Hardware document:

    "This is a serial port connection so we can talk to PropForth on the Prop Chip serially if we so choose

    IO 0 -> 220 ohm resistor -> IO 30
    IO 1 -> 220 ohm resistor -> IO 31"

    The addition of the pull-ups is a good idea.

    The PropForth kernel is ready to talk on pins 30/31 at 57600 as it comes out of the box.

    Now, go Forth!!
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-10-04 04:50
    Thanks all.
    I really have been wondering why I didn't get involved in Forth sooner. I seems ideally suited for the Propeller as you don't have to cross-compile and download from a PC once you get it going. Great for experimenting and developing.

    I was just going to cable through without any resistors, but they do make sense now that they are mentioned.

    So I have a bit of building and we will see what happens next.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-10-04 06:15
    Glad to have you joining! This is probably the best time to get started. Nearly all the kernel development work is complete, the final release(s) 5.x are being integrated and packaged up. Release 5.0 will introduce all Sal's new assembler optimizations. Sal reports the performance increase is "very noticable".

    Propforth is nearing the target state, where it is everything Sal needs for his projects, and also what I imagine I should have had access to when I was in elemetary school fifth grade. The functionality should all be in place, now I need to work on the documentation so it is understandable by kids (and their parents).

    Please check out the regression test suites. Presently, 5.0 will be the functional package and use the "old" standard platform for regression test, and 5.1 will use a "new" standard platform for regression test and support automated regression test scripting. Although the tests are not yet automated, the tests do provide the initial documentation for each functional area, examples of the intended use of each fucntion, and evidence that each function operates as intended. When possible, ask questions in terms of the functional tests, it makes it easier to diagnose and respond.

    Please make lots of commentssuggestions/questions. Particularly when you still have your new user perspective, this may help with kids/parents questions.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-10-05 03:47
    @Prof_Braino
    Thanks for you reply, but regression testing and such is a bit more than I need to know at this point.

    I am re-reading "Starting Forth" and "Thinking Forth". Both are useful. For the longest time, I thought all and everything was done in 'the Stack' in Forth and I now see that is not exactly true. But the Stack is there as a means for fast and easy manipulation of whatever the Dictionary provides.

    "Thinking Forth" is a bit much for a beginner, but it really has been helpful as a means to comprehend Forth's position in the 'Software Universe'. These days OOP seems to be emphasized a bit too much. And a Shell Script approach is not really as useful for a small micro-controller or small micro-computer.

    And so, version 4.6 seems my entry point. I don't want to be part of the leading edge.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-10-05 09:58
    regression testing ans such is a bit more than I need to know at this point.

    I think that the name needs to be changed. "Regression test" seems to lack the friendly, welcoming connotation we wish to convey. The regression tests are the "Start Here" tutorial and the use case examples for all the functions. The books are good in a general sense, but the tutorial has the specific "tailored to the prop" bits.

    What we call "regression test" is actually better named "Getting started and examples of the functions you want to use". (But that also sounds lousy). If you run the regression test for any function you wish to use, you will have experienced using it correctly at least once. Any function you don't need, i.e. spinneret, ethernet telnet http; just skip. I strongly encourage the tutorial as the first step, as it answers all the questions (and then you can ask better "next" questions).

    One last, 4.6 (and all previous versions) are prototypes leading up to the final version, none are meant to be used beyond the next release, as the new release is always a major improvement of the previous version. So far only one user (Ron) has reported intention of making a branch using an old release (3.6 for the C3), but that is for a specific application (forth source code text editor for C3 hardware); but we think he too will port to the final release since it is faster and easier to use.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-10-05 10:16
    And yet, the newcomer doesn't really want to chase software updates and documentation revisions at a fast pace while trying to get one's bearings in a new software language.

    I had a lot of trouble with SX Basic and Spin initially because so much was in play as I was trying to get started. I even set aside the Propeller for what seems to be a few years because of the dynamics where sophisticated users are moving ahead while the slower learner is just trying to get started.

    I think I do believe that I understand what you are saying. I am happy that Propeller Forth has clear development goals. But it is all rather like shooting at a moving target.
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-10-05 12:16
    Loopy,

    I don;t know how far you've gotten with loading PropForth.

    This thread http://forums.parallax.com/showthread.php?132361-PropForth-4.5-on-the-GG-Propeller-Platform from a while back takes you to the point where you have SD on the Gadget Gangster Propeller Platform up and running and saved away in EEPROM. It was written against PropForth 4.5 but nothing changed in 4.6 that would affect the process.

    As my non-existent free time permits, I wanted to do some start-up documentation. I think I got distracted over the summer when I saw something shiny.......I'm not known for my long attention span or my conviction to follow-thru.
  • Brian RileyBrian Riley Posts: 626
    edited 2011-10-05 12:23
    And yet, the newcomer doesn't really want to chase software updates and documentation revisions at a fast pace while trying to get one's bearings in a new software language.
    ...
    But it is all rather like shooting at a moving target.

    What he said! @Loopy, I said pretty much the same thing in another thread.

    However after reading over the v5.x promotional documents I think that it is safe for you to jump in at 5.0 . The speeding target drops to a slow walk at 5.0 and looks like it is going to come to a complete halt at 5.1
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-10-05 21:12
    Thanx. I am having a bit of confusion about availability of 5.0. I will visit the PropellerForth website for another look. I guess it is ready now, but I see this other thread herein that keeps mentioning Propeller Forth 4.6.

    I will take 5.0 as my point of entry per your advise. I am still getting the Propeller Proto Board ready for this as I want to dedicate one board just to a Forth platform. Like many others, things get done at a snail's pace or in fits and starts.

    Forth has been a language that I have poked at several times over the years, but it has never quite taken hold. Mostly it seemed to be too different to me for a PC environment. On the Propeller, it seems to be a nice fit for control of the 32 pins. The micro-controller offers more immediate uses for it.

    As I think I understand it, COG 7 runs Forth and Cogs 0-6 are available for various tasks.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-10-05 21:15
    Home page? Please? With V5.0? I seem to only locate V4.6

    Here >>>> http://code.google.com/p/propforth/downloads/list
  • caskazcaskaz Posts: 957
    edited 2011-10-06 02:19
    Hi Loopy,

    Forth-kernel is on COG6. COG7 communicate to PC.
    User is usable COG0 - COG5.
    Now PropForth4.6 is available.
    PropForth5.0 comming soon.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-10-06 03:31
    Hmmm.
    So Prof_Braino is a bit ahead of what is available..........

    Thank you. It is all clear now.
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-10-06 04:06
    The Professor is on the leading edge of PropForth development!! :lol:

    You were pretty close in your COG footprint.

    As the standard kernel comes out of the box, COG7 runs the SERIAL I/O for pins 30/31, COG6 runs the first instance of the Forth interpreter. This is the COG you are interacting with at the Forth prompt. You can run other Propforth words (or PASM) on the other COGs.

    There is a fun word - cogx that lets you start a forth word on any available COG. There is also >con which lets you connect the console I/O to any cog.

    Each release, I've printed out the .f files for the major functional parts and marked up all the word definitions with a highlighter. It's been a great way to find all the features that are rolled up in the kernels and supplemental pages.
  • Martin_HMartin_H Posts: 4,051
    edited 2011-10-06 06:00
    Loopy, I'm using a two step approach to learning Forth. I'm learning Forth in general on a PC using gForth, and then porting code to PropForth after I have it working. I found this helpful because gForth is able to run code out of tutorials without modification. Then when I port it to PropForth I usually find that most of it works, but there are a few gotchas.

    It just seemed a little easier than learning Forth and PropForth differences at the same time.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-10-06 06:18
    mindrobots wrote: »
    Each release, I've printed out the .f files for the major functional parts and marked up all the word definitions with a highlighter.
    It's been a great way to find all the features that are rolled up in the kernels and supplemental pages.

    HEY! This is a great idea! Sal divides up the files per the way he thinks avbout them, which everything all at once together.
    I've always thought the kernel source could be divided up into separate files or at least separate sections to better show what goes with what and include extra comments, etc. If you've already started this, it would be a help if you could share it.

    Please PM me with your gmail address if you are interested so I can add you to the contributor list so you add/modify the doc pages.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-10-06 06:21
    Martin_H wrote: »
    a two step approach to learning Forth.... on a PC using gForth, and then porting code to PropForth.

    This is a good way to do it. Seeing the examples run on the PC gforth, then modifying the code to run is propforth gives a good perspective.

    Are you interested in adding your notes to the documentation? Please PM me with gmail if you want to be on the contributor list
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-10-06 06:49
    PB, I'm already a "contributor" in theory. :lol:

    Currently, it's a manual process that results in a binder full of listing with tabs and colored high lighter scribbles. A more automated process to digest major code files and spit out comment details would be a nice programming project for me.

    I'm starting to realize I must have some sort of mental defect. As I play and dabble in other disciplines and areas of interest, by either coercion or random interest, I think "Oh that's nice" or "hmmm, that's interesting" but when I start playing with Forth for some reason, I get all excited and my mind starts spinning with ideas until life bumps me off track. If I could focus, I coulda been a contender! :smile:

    Martin_H, I like your idea. I'd like to look at gForth and see if some sort of IO/Channel concept could be implemented to spread the multi-PropForth model to include a gForth running on a PC. The PC if connected could load, delegate and communicate with tiered levels of Props running PropForth in a Master/Slave relationship. If the PC Master wasn't present int he configuration, the Master Prop could take over.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-10-06 08:03
    mindrobots wrote: »
    Currently, it's a manual process that results in a binder full of listing with tabs and colored high lighter scribbles.
    I'm starting to realize I must have some sort of mental defect.

    That "defect" is what I'm after. If we could bottle it, we'd be rich. Or at least get some cool documentation.

    I'm thinking the second phase of you process could be make a web page for each of your tabs. Cause I really need the extra help. You already know more about propforth than I do. Just keep it in mind, in case you get a chance and feel like sharing....
  • Brian RileyBrian Riley Posts: 626
    edited 2011-10-06 08:16
    This is a good way to do it. Seeing the examples run on the PC gforth, then modifying the code to run is propforth gives a good perspective.


    F.Y.I. gForth is available on the Mac using MacPorts to install as CLI in Terminal
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-10-06 08:29
    ...You already know more about propforth than I do. Just keep it in mind, in case you get a chance and feel like sharing....

    Haha, I almost spewed Pepsi all over my keyboard!!

    I'll try helping with the documentation - the process to generate it should be the same regardless of release.

    For what it's worth, I'm running gForth on Ubuntu Linux and it was installed as a standard package from the package manager.

    My Windows CLI version came from here: http://www.complang.tuwien.ac.at/forth/gforth/
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-10-06 08:29
    mindrobots wrote: »
    Martin_H, I like your idea. I'd like to look at gForth and see if some sort of IO/Channel concept could be implemented to spread the multi-PropForth model to include a gForth running on a PC. The PC if connected could load, delegate and communicate with tiered levels of Props running PropForth in a Master/Slave relationship. If the PC Master wasn't present int he configuration, the Master Prop could take over.

    This is what I orignally envisioned with pygmy forth, but I got side tracked on the Sieve of Eratosthenes (I'm not always as smart as I think). If you guys decide that gforth is the way to go I can load it up. (just googled gforth)..... You guys realize that gforth/ANSI forth has little or no relation to microcontroller/embedded forth, yes?
    Better stated, gforth relates to propforth similar to the way a C-130 relates to a Baha dune buggy. No, that's a stupid analogy.

    Gforth is designed to use the resources of a workstation, while propforth is designed for a micro where we add our own resources as we decide.
    Both are cool and have their uses, do we want to expand our direction into the workstation realm? If this is the case, this doubles our scope.
    You guys think big. OK, I'm in. Adding new project to list.....
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-10-06 08:47
    But you can land your C-130 on a short runway, roll your dune buggy out the back, interact with the environment, load it back into the C-130 and then take off! Pygmy Forth gives you a similar look/feel between the Prop and the PC - to carry your analogy forward, it puts a steering wheel, clutch, brake and gas pedals and a shifter into your C-130 cockpit. It's hard to get the best out of a C-130 driving it like a car.

    I was seeing the PC (Win/Linux/Mac) Forth as a force multiplier with a Forth word based interface between the two (or between the Prop cluster and the PC).
  • Martin_HMartin_H Posts: 4,051
    edited 2011-10-06 11:09
    You guys realize that gforth/ANSI forth has little or no relation to microcontroller/embedded forth, yes?

    Indeed I do. I stumbled upon gForth and since many of the Internet tutorials assume ANSI Forth I figured it would be a good match. I quickly realized that PropForth wasn't ANSI Forth, but that made sense given the more compact environment. After your first mention of Pygmy Forth and I tried it, but liked it less than gForth.

    BTW So far my Forth code looks either like a C programmer trying to write Forth, or a LISP programmer trying to write Forth. But I haven't quite hit the it looks like other people's Forth zone yet.
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-10-06 11:51
    My Forth code looks like a Neanderthal* cave painter trying to write Forth.

    "Mmmm, Grog make word!"

    *no offense to our Neanderthal forum members
  • caskazcaskaz Posts: 957
    edited 2011-10-06 16:09
    Hi mindrobots.

    If you write PropForth-code, please post your code.
    I think we should read many codes.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-10-08 01:21
    I have gForth available on my Ubuntu Linux, but the real appeal of PropForth is that it does NOT have all the diversity of gForth. So the dicitionary is more of a condensed core version of Forth with some additions to manage Propeller Cogs.

    I am still muddling through getting my Forth up on a Propeller Proto Board as I decided to add a MAX323 for the serial interface instead of just running a TTL interface.
Sign In or Register to comment.