Sunday, March 13, 2016

Diving Into Forth

I have always had a soft-spot for the Forth Programming Language, since first hearing about it as a sixth-former in the very early 1980s when I was running the after-school computer club on Friday afternoons.

At that time, I lived in the technological backwaters of the Isle of Man, gleaning all my information from electronics and home computing magazine articles and the occasional worthwhile BBC "Horizon" programme.

There was mention of Forth in the popular computing magazines - but it was probably the August 1980 Byte article - which originally galvanised widespread interest in using Forth.

Towards the end of my school days, an innovative Z80A based home computer the "Jupiter Ace"  became available - but sadly it was a "day late and a dollar short" in those crazy, pioneering days of UK Home Computer industry - with new products announced nearly every week.

Since that 1980 article, we now have the internet, Github, open source software and hardware, ubiquitous 32-bit and 16-bit microcontrollers, FRAM memory, FPGAs and dozens of other technical innovations which should all help encourage users to have a look at Forth for digital interaction.

Getting started in Forth has never been simpler, in addition to Matthias Koch's Mecrisp they are other downloadable packages, including 4E4th (for MSP430) and VFX/XC7 Lite (for MSP430 or ARM M4) from MPEForth.

I have focused on the above two architectures MSP430 and ARM, because a Forth implementation of the Forth 16-bit virtual machine is so much simpler - and sensible - on a 16-bit or 32-bit architecture, than on an 8-bit processor.

4E4th runs on the low cost MSP430 Launchpad - details of this implementation.

There is also AmForth for MSP430  - based on Brad Rodriguez's  camelForth.

(Although Amforth and eForth implementations for Ardunio's 8 bit AVR are available).

Looking at FPGA implementations, there  is James Bowman's J1 Forth processor which runs on a Xilinx Spartan 6 device, or also on a Lattice iCE 40 series part - with the tool chain now entirely open source.

I also recently came across the N.I.G.E Machine - a 100MHz Forth Workstation,  again based on low cost FPGA technology.

If you want to build a workstation type product - suitable FPGA hardware with  PS/2 Keyboard & Mouse and VGA/XGA video output is available from Saanlima Electronics in their Spartan 6 Pepino board and also from Gadget Factory in their Papillio range of FPGA boards.  If you are looking at the Gadget Factory - take time to look at their new Logic Analyser Kit

Whilst there are various Forth Interest  (FIG) Groups around the world,  it is probably the German,  Forth-Gesellschaft e.V. who are the most active, with regular news and updates on their website

For anyone with an interest in Forth, why not spend a quiet Sunday morning browsing on what is available?

You might also wish to look at Jean Claude Wippler's JeeLabs Blog - with his recent forays into Forth, which inspired me to write this blog post round-up.



No comments: