Dick Cappels' project pages http://www.projects.cappels.org
Return to Projects HOME
ATTOBASIC WITH 32K OF EXTERNAL RAM
VERY EXPERIMENTAL, THIS CIRCUIT GIVES ENOUGH PROGRAM SPACE TO GET THE MOST OUT OF 255 LINES OF CODE
Download the AVR Sudio Assembler Source 8515XR-031013A.asm
Download the AVR Studio Hex file 8515XR-031013A.hex
The code above runs at 9600 baud with a 4 Mhz crystal. To change it to work with a different crystal,
change this statement in the source code and reassemble:
.equ clock = 4000000 ;clock frequency
This is a continuation of the work on AttoBaisc for the ATMega8515/AT90S8515. Please see the AttoBasic page for these processors for details by clicking here.
Differences between this extended version of AttoBasic and the version that only uses on-chip RAM:
• More program memory
• STORE and LOAD functions do not work.-don't try them.
This is the current stat of a work in progress, though progress may be slow, I've modified the program memory to use 32k bytes of external RAM. I used a Cypress CY7C199-150, though other 32K static RAMs can be uses as well. Just make sure to check the Write and Read pulse polarity on the alternate chip.
Here is why this is good:
The available program memory reports as (and appears to be) 31,786 bytes. You can't run out of program memory (read below to see why this is impossible).
Here is why this isn't as good as it might first appear:
• A maximum of 256 lines (0..255) are supported.
• There is no way to address the rest of the ram (perhaps as one or more arrays would be nice).
Here is a trick to get more out of those maximum of 256 lines:
The "THEN" statement is treated as the logical end of a line by the interpreter, with execution beginning immediately after the "THEN" statement. For example, see the screen dump below.:
10 FOR A = 1 TO 3 THEN PRINT A THEN NEXT THEN PRINT A + 100
Free pages:123 chars:238
Notice that the program performed the entire for-next loop then went on to print the sum of A +100.
You can do this with the other versions of AttoBasic as well, but because of the limited RAM in those versions, there is little advantage to this trick.
While there is a list of features that I would like to add (32k EEPROM support, line numbers to 65,535, more stack space, strings, arrays, 16 bit variables and arithmatic, possibly named variables and REM statements for starters), I have not been able to dedicate much time to this project. You are invited to make enhancements, and I sure would like a copy if you make any enhancements. I would be pleased if you would allow me to to post enhanced versions on this site. My email address is dick @ cappels.org (Remove the extra spaces before sending.)
The only components necessary to extend the RAM is a 32k static RAM chip, an octal latch for some of the address bits, and the necessary decoupling capacitors. The 0.33 uf caps I used are tanitlum, and the RAM I used has 150 ns access time.
the shematic above, I connected any address line from the
controller or the latch to any address line on the RAM chip.
Similarly, any data line from the controller can connect to any
data line on the RAM chip. This makes wiring of the board (or
layout of the PCB) simpler than trying to connect correspoinding
address and data lines
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.
Return to Projects HOME
Please see the liability disclaimer on the HOME page.
Contents ©2003 Richard Cappels All Rights Reserved http://projects.cappels.org/
First posted November, 2003