Build a 80s Style Home Computer From Scratch From Arduino Components
Introduction: Build a 80s Style Home Computer From Scratch From Arduino Components
This project began in a rainy summer 2021 in Corona lockdown when I started to write a BASIC interpreter for Arduino from scratch. The project was simple and mainly targeted for Arduino UNO and other small systems but has now outgrown this beginnings.
This project is to show how one can build an entire standalone computer with it much like the ones which conquered the home computer market in the 80.
For more details on how this started, the interpreter architecture and BASIC in general, please take a look into my repo https://github.com/slviajero/tinybasic/wiki. There is a small manual of the BASIC interpreter and the supported hardware.
After two less ambitious projects of building a small LCD shield BASIC computer and an small computer with a keyboard, display and printer - inspired by the legendary AIM65, this is the attempt to build a real computer.
The computer here is an Arduino DUE based home computer with a 7 inch 800x480 graphics display, printer support, SD card disk, a PS2 keyboard and a real time clock. It includes full Arduino I/O support and an easy way to access I2C devices from the BASIC language. Optional RF24 support is available.
This instructable is an extension of my work in the Arduino project hub. https://github.com/slviajero/tinybasic/wiki/Projects:-4.-A-standalone-computer-with-a-TFT-screen
Supplies
The system is based on an Arduino DUE microcontroller. It offers enough RAM to have 60kB of BASIC memory in your home computer. The processing power of the ARM based CPU is sufficient to drive a 7 inch TFT screen.
The other essential component is the TFT screen. I use a 7 inch 800x480 SSD1936 screen. These devices are supported by the UTFT library for Arduino. Selecting a suitable screen can be tricky. You need to consult the UTFT documentation if you buy another model.
To connect the DUE with the screen a TFT shield is needed. There are shield for Arduino MEGAs and for DUEs. These are separate models. They differ in the way the SPI bus is handled. 33
You will need a DUE shield if you use a DUE microcontroller. This instructable also works with MEGA 256 microcontrollers. For them you need a MEGA shield.
In addition to this you need two medium size breadboards, an PS2 connector, a PS2 keyboard plus some cables and a logic level converter.
You need the Arduino IDE as a software component as well as my BASIC interpreter from the repo https://github.com/slviajero/tinybasic.
Step 1: Prepare the TFT Shield and the TFT
The TFT shield will cover the upper side of the Arduino completely. No additional wires can be connected easily. There are no prototype boards on the market that work with a shield. For this reason I soldered a few wires to the shield to get access to power after mounting the microcontroller to the shield.
The blue wire is GND, the white wire is +5V and the green wire is +3.3V. There wire can be connected to a breadboard at the base of the display to provide power for the keyboard and additional devices.
My DUE shield as an own SD card slot. An old 2 GB SD card formated with a FAT filesystem serves as mass storage. Best preload the BASIC programs from the repo to have them ready once your computer is up and running. There are games, test programs and demos of the Arduino functions in three different folders in the repo.
Turning around the shield you see an important detail; DUE shields have a SPI connector in the middle of board. Unlike the MEGA 256 the SPI bus of a DUE cannot be accessed from pins 50-53. It is only reachable through the middle SPI connector. A MEGA shield will not work on a DUE as mega shield often do not have the extra SPI pins in the middle of the board.
There is one more important point when you use the TFT shield for DUEs. In the library folder of UTFT (UTFT/hardware/arm) you need to edit HW_ARM_defines.h and uncomment #define CTE_DUE_SHIELD 1. If you use other shields consult the UTFT documentation.
Step 2: Prepare the Arduino
I use pins 8 and 9 to connect the PS2 keyboard, the second serial port for the printer and the I2C pins for the optional real time clock and other peripherals.
To get access to the pins without more soldering cables can be hooked up in the DUE before the shield is connected. 991