Dick Cappels' project pages http://www.projects.cappels.org


Return to HOME (more projects)
AttoBasic Home

AttoBasic Version 2
Byte wide basic, based on the original AttoBasic, version 2 includes several new functions by Scott Vitale that
make it an excellent hardware debug tool, as well as a platform for small programs.


Photo of a real life device that used AttoBASIC to
test individual integrated component functionality




Downloads are at the bottom of this page. CLICK HERE

Overview
AttoBasic berson 2 is a straightforward implimation of a byte-wide basic interpreter that provides access to the controller's on-chip peripherals, including commands that directly support the Pulse Width Modulator, the A-to-D converter, and Input Capture. Interfaces directly provided include TWI, SPI, DS, and high resolution generation of low frequency signals via a Direct Digital Synthesizer function. The interactive interpreter, either interpreting single lines from a terminal or an entire program stored in memory wihtout the delay of compiling and loading an entire program is an excellent tool for debugging and experimentation on hardware.

AttoBasic verson 2 was came into existance when
Scott Vitale augmented and adapted the original AttoBasic to the ATmega32, ATmega88, and the ATmega168.


Operation

Programs are typed or loaded from a terminal via a line editor, and stored in internal RAM. SAVE and LOAD commands save and load the program from the on-chip EEPROM. If RXD pin is held low during power-up, EEPROM code will be automatically loaded and executed, thus allowing unattended operation.

The lower 256 memory locations is available for use as an array via PEEK and POKE commands. 26 Variables (A..Z) are supported. All arithmetic and variables are byte-wide. Strings are not directly supported though all characters can be read with "KEY" and printed with "EMIT" commands.

The Line editor supports destructive backspace (delete key), line replacement, line deletion, and line insertion. Valid line numbers range is 0..255. Lines entered with a numeral in the first column will be stored, others will be interpreted immediately. The interpreter is not case-sensitive. PEEK and Poke provide access to all on-chip peripherals. Special I/O commands support bit and byte I/O. GOSUB-RETURN and FOR-NEXT loops have one return level.



To view the set of commands supported by AttoBasic Version 2, click here: commandlist.html


AttoBasic 2.0 ATMEGA168 DIP Pinouts






Pins not used for AttoBasic-specific funtions may be
used for alterante uses under control of AttoBasic


Minimum Hardware

The minimum hardware configuration for programming in AttoBasic 2.0 is an ATMEGA168 controller with AttoBasic in Flash, a serial interface, and a power source.

Above is an example of the minimum configuration using an
ATmega168. See this:
Schematic.pdf for an example of how to connect
to the peripherals.



The minimum hardware configuration consists of an ATMEGA168, a
serial interface and voltage regulator. The serial interface is
only needed for programming because the program can be set to
start upon the application of power. The crystal is optional.






Downloads
AttoBasic 2.0 Command List commandlist.rtf

Schematic of example circuit showing TWI and SPI connections among others  Schematic.pdf


Source Code, schematic, and all the files above in a zipped file  AttoBasic_2.0 source package2.zip

Example Programs
Zipped package of six example AttoBasic program files Example_AttoBasic_2.0_Programs.zip
Included in this package:    
AD9337_Setup.txt
ADC_Test.txt
Beeper_Test.txt
BoostRegTest.txt
ICP_test.txt
TWI_test.txt
The example programs can be loaded into the AttoBasic chip using the serial interface whle AttoBasic is not intepreting a program.

Hex Files

All files below provide 19,200 baud operation with the indicated clock frequency.

ATmega32
AttoBASIC_M32-8MHz.hex
AttoBASIC_M32-10MHz.hex
AttoBASIC_M32-12MHz.hex
AttoBASIC_M32-16MHz.hex
AttoBASIC_M32-20MHz.hex

ATmega88
AttoBASIC_M88-8MHz.hex
AttoBASIC_M88-10MHz.hex
AttoBASIC_M88-12MHz.hex
AttoBASIC_M88-16MHz.hex
AttoBASIC_M88-20MHz.hex

ATmega168
AttoBASIC_M168-8MHz.hex
AttoBASIC_M168-10MHz.hex
AttoBASIC_M168-12MHz.hex
AttoBASIC_M168-16MHz.hex
AttoBASIC_M168-20MHz.hex




Find updates at www.projects.cappels.org

AttoBasic Home
Return to HOME (More Projects)
 
Contents ©2011 Richard Cappels and Scott Vitale. All Rights Reserved. Find updates at www.projects.cappels.org

First posted in May, 2011, minor modifications June, 2011 typo corrected 2 Nov, 2011.

You can send  email to me at projects(at)cappels.org. Replace "(at)" with "@" before mailing.

Use of information presented on this page is for personal, nonprofit educational and noncommercial use only. This material (including object files) is copyrighted by Richard Cappels and may not be republished or used directly for commercial purposes. For commercial license, click here.

  Liability Disclaimer and intellectual property notice
(Summary: No warranties, use these pages at your own risk. You may use the information provided here for personal and educational purposes but you may not republish or use this information for any commercial purpose without explicit permission.) I neither express nor imply any warranty for the quality, fitness for any particular purpose or  user, or freedom from patents or other restrictions on the rights of use of any software, firmware, hardware, design, service,information, or advice provided, mentioned,or made reference to in these pages. By utilizing or relying on software, firmware, hardware, design, service,information, or advice provided, mentioned, or made reference to in these pages, the user takes responsibility to assume all risk and associated with said activity and hold Richard Cappels harmless in the event of any loss or expense associated with said activity. The contents of this web site, unless otherwise noted, is copyrighted by Richard Cappels. Use of information presented on this site for personal, nonprofit educational and noncommercial use is encouraged, but unless explicitly stated with respect to particular material, the material itself may not be republished or used directly for commercial purposes. For the purposes of this notice, copying binary data resulting from program files, including assembly source code and object (hex) files into semiconductor memories for personal, nonprofit educational or other noncommercial use is not considered republishing. Entities desiring to use any material published in this pages for commercial purposes should contact the respective copyright holder(s).

web counter
web counter