Wide Basic for ATtiny2313

  
This firmware is intended to run on an Atmel ATtiny2313 operating from a 4, 8, 10, 16, or 20 MHz clock or an AT90S2313 operating from a 4 MHz clock. As far as I have been able to determine, the ATtiny2313 and AT90S2313 versions are interchangeable, and the only difference is that they were assembled using different include files. When connected to minimal interface circuitry, a chip programmed with this interpreter will interact with an ASCII terminal allowing the writing and execution of small Basic programs and hardware debugging by immediately executing commands from the terminal that are not preceded by a line number. Communications with the terminal is via RS-232 (EIA-232) at 9600 baud, 8 data bits, one stop, no parity. Pin 2 (RXD) and pin 3 (TXD) should be connected to an inverting RS-232 interface as shown in the schematic on this page. The Maxim MAX-232 and similar interface chips as well as the discreet interface shown in Atmel's AVR-910 application note are examples of such interfaces.
Wide Basic for ATtiny2313 - schematic

Programs are typed directly into on-chip RAM and may be saved to the on-chip EEPROM with the SAVE command and loaded back to RAM from the on-chip EEPROM with the LOAD command. If pin 2 (RXD) is grounded when the chip comes out of reset, either from the application of power or after an external reset, the contents of the EEPROM will be loaded into RAM and executed by the interpreter. If the contents of the EEPROM is loaded when the EEPROM is in the erased state, some of the internal pointers may be set inappropriately, so it is advisable to type ?NEW" to reset the pointers prior to entering a new program. A weak internal pull-up is applied to pin 2, and as a consequence, the 39k pull-up shown in the discreet RS-232 receiver in the schematic is no longer needed. When power is switched on, you should see it type the greeting line, then drop a couple of lines and present a prompt: Atto Basic V0.2. Copyright 2002 Richard Cappels,projects@cappels.org You can enter commands and arguments at the prompt. Variables can be manipulated and they are not cleared when the program is run, thus the terminal maybe used to initialize variables before the program is run, and it can be used to read results after a program is run, thus saving precious program memory.



Leave Comment

characters left:

New Circuits

.