2 comments on “Forth on the Arduino (Forthduino)

  1. I just tried this, with the ArduinoISP programmer instead of USBasp. The result is a serviceable Forth core. The command in load.bat had to be modified to change the option “-c usbasp” to “-c arduinoisporg” , using the latest Arduino distribution. I used a Uno R3 from Hobby Components.

    The Forth command line is accessible by plugging the Arduino Uno into the PC USB port and using TeraTerm at 38400 baud in Windows.

    The dictionary is rather sparse, but you can verify control of the hardware by the following basic test, each line entered at the prompt using TeraTerm or another suitable serial terminal emulator.

    $20 $24 c!
    $20 $25 c!
    $00 $25 c!

    The first command makes Arduino pin 13 (the one with a built-in test LED on the Arduino Uno) an output pin. The second turns on the diode by writing a 1 to the relevant bit of Port B. The third command turns the diode off by writing a 0 to Port B.

    My next step is to download the latest version of amforth and build my own binary image in a .hex file. Thank you for providing this very convenient starter kit.

Leave a Reply

Your email address will not be published. Required fields are marked *