Micro8085 Development Board with Tiny BASIC
So, what’s this? The Micro8085, an embedded development board with the Intel 8085 CPU, running Palo Alto Tiny BASIC. And with hardware support for GPIO, Timer, UART, SPI bus, e2mem, ADC, DAC, PWM and comparator input.
Because it’s fun! The Intel 8085 was the first CPU I learnt to program (early 80’s), and I had a bunch of chips and old projects lying around which would be great if I could make some use of. And I wanted to show that a CPU from 1976(!) with some basic peripheral circuits will still have decent performance.
But perhaps the most important and strongest driving force for this project comes from a notion I have accumulated over several years in my profession as an embedded hardware and software engineer: It’s not easy to find junior developers with a fling for the un-fanciness of binary theory, designing algorithms, handling of arithmetic and logical problems, low level programming, etc. What if this particular board could inspire just one kid with a budding interest in programming, to go deeper into the world of embedded systems? It would be worth a try.
Palo Alto Tiny BASIC
As a platform for the board functionality, and to have some sort of “operating system”, I selected the Palo Alto Tiny BASIC. I guess there is plenty of information on the Internet about Tiny BASIC, but it especially attracted my interest since it’s considered to be the first ever free software/open source project. It originates from a counter movement to the commercial Altair BASIC, developed early 1975 as the first product of the by then newly founded Microsoft company. Altair BASIC sold for $150, a price that inspired hobbyists as well as computer scientists to want to do something of their own.
The Palo Alto Tiny BASIC is one of several versions of a community driven development of a BASIC interpreter that ran on the microprocessors available in the mid 70’s: Intel 8080, MOS Technology 6502 and Motorola 6800, to name the most common ones. Dr. Li-Chen Wang wrote the interpreter source, and the original mnemonics was translated to Intel assembler by Roger Rauskolb. It was originally published in Dr. Dobb’s Journal, May 1976. In the source code, Dr. Wang included the now quite famous copyright statement with a peculiar twist: “@COPYLEFT ALL WRONGS RESERVED”.
Additions to the interpreter
I decided that the interpreter should be able to run over a USB/serial port and connect to a terminal emulator program on a PC. So the line input functions of the original code needed a big overhaul in order to accept left and right arrow for moving the cursor, backspace and delete key for error correction, and the ability to insert new characters anywhere in the buffer. Already typed program lines also needed a way to be able to get edited (so you don’t have to retype the whole line, if you realize you made a typo error), and therefore I added the direct command EDIT linenum.
When you’re working with a project on a board like this, I thought it would be very convenient to be able to store and restore BASIC programs to and from a non-volatile memory. Then you could work with your programming ideas, store the program, and don’t have to worry about not turning off power to the board. Next time you just restore the program and continue working. So the board has a 32kB EEPROM memory connected via a SPI (Serial Peripheral Interface) bus, and it is accessible using the added direct commands SAVE and LOAD.
Depending on your choice of terminal emulator, it is of course also possible to just execute the LIST command, then select and copy the lines of your program that you want to save, paste them into an empty document of a plain text editor, and save it as a text file. The n to restore the program, look for a “Send text file...” command in your terminal emulator, open the file containing your program,...Read more »