AttoBASIC - An interpretive language - ARDUINO compatible

Fellow ARDUINO Enthusiasts:
Being a hobbyist and electronics engineer, I have always dreamed of having a software/hardware platform that I could use to quickly and easily test and evaluate new peripherals. FORTH is a great candidate but at that time, the only flavor of FORTH of any interest was severely lacking in documentation and I was not able to get it running on my particular platform, a Mega88 at the time. In searching for other information, I ran across AttoBASIC written and developed by Dick Cappels back in 2002/2003. AttoBASIC is a byte-wide (8-bit) Tiny-BASIC that supports manipulation of AVR I/O via the command line as well as programmability (it is BASIC after all). Support for SAVing and LOAding to/from on-chip EEPROM allows one to execute the stored program at powerup by setting the level of an I/O pin (self-start).

Mr. Cappels' AttoBASIC was originally written for the AT90S2313, later ported to the AT90S8515 and then to the ATMega163. It uses the on-chip UART so a serial port is needed to talk to it. After downloading Mr. Cappels' Mega163 source code and assembling it, I have ported AttoBASIC to the Mega88/168/328 and Mega32U4 , all using conditional assembly. I also added support for SPI, TWI, Input Capture (gate-time selectable pulse counter), DDS (port-bit toggle), 8-bit random number generator, 8x8 multiply and divide and arithmetic overflow/underflow detection. I ported PJRC.COM's USB Serial I/O code to AttoBASIC to support USB Serial I/O on the Mega32U4.

Since the Arduino has become such a popular platform, support for the Mega88/168/328 and Mega32U4 is inherent and can provide folks with a means to use an interpretive language on their Arduino's. AttoBASIC has been tested with Nano and Duemilanove but should work on any ARDUINO based on Mega88/168/328 or Mega32U4.
Version 2.2 fixes a few bugs and adds a few more features. Mainly support for access to an external EEPROM attached to the SPI port so it can be used as a data file.

Having data file support led to a natural extension to use AttoBASIC as the heart of a programmable data recorder (see AVR Data Recorder project).

Being that Arduino's typically contain a boot-loader, support was added to AttoBASIC to include the OptiBoot-loader for the Mega 88/168/328 AVR's in case one wishes to use the ISP to re-flash their ARDUINO. The boot-loader for the Mega32U4 is Dean Camera's LUFA in DFU mode.

In the project ZIP file, one will find pre-built HEX files for the Mega88/168/328 and Mega32U4 at clock speeds of 4, 8, 16 and 20MHz. Builds are available with and without the OptiBoot-loader (or LUFA) as well as builds for the Mega32U4 using UART or USB for serial I/O and the Mega328 as a data recorder. The builds without the boot-loader can be uploaded to the target platform (Arduino) using avrdude.

For more information, the AttoBASIC command reference, Arduino programming instructions, source and pre-assembled HEX files are available on Dick Cappels' web site: http://cappels.org/dproj/AttoBasic2_2/AttoBasic_2.2_with_USB_and_Arduino_support.html or On AVRFREAKS.NET (free login required): http://www.avrfreaks.net/index.php?module=Freaks%20Academy&func=viewItem&item_type=project&item_id=3621

Please give feedback on bugs and or desired features.

Peace,
Scott