Task: Connect Your Atari 8-Bit Computer to an Arduino Microcontroller
Needed: Arduino UNO, Arduino IDE software, SIO cable, Jumper wires, Breadboard, 10k ohm Resistor
Time: about 1-2 hours with all components ready
I have always been interested in non-standard devices connected to and controlled by the Atari computer. Examples include the Axlon Andy robot and the AtariLab sensors. I have always wanted to do a project to connect an Atari to a device that I could use to control a motor, a servo, or even a robot. Fortunately, there are a number of really good and inexpensive microcontrollers available for this purpose. For this initial project, I will focus on using the Arduino single-board microcontroller to read output from the Atari SIO serial port.
The SIO was revolutionary for its time and enabled the bi-directional flow of data from devices such as modems or floppy drives. Its 13-pin interface sends and receives data, provides signals to peripherals, and provides voltage to power devices. For the purposes of this project, we will focus on pin 8 that sends an analog signal to start and stop the cassette motor. We will read this signal using the Arduino. The motor signal on pin 8 is controlled by poking a 52 to address 54018 to start the motor (POKE 54018,52 in BASIC) and by poking a 62 to the same address to stop the motor (POKE 54018,60). You can confirm this by attaching an Atari 410 or 1010 cassette drive, pressing play with a cassette loaded, and issuing the different POKE commands. You will see the turning of the cassette tape starting and stopping.
I chose the Arduino as my microcontroller because I have worked a little with it before, it is easily available (unlike the Raspberry Pi), and relatively inexpensive (< $30). The Arduino has pins to read and write both analog (integer values) and digital signals (binary). Further, it has a microprocessor that can be programmed through a relatively user-friendly IDE. There are tons hardware project examples with Arduino code online to reference.
Below are the step-by-step instructions for connecting an Arduino to the SIO port and reading values from one of the pins.
Second, download and install the Arduino IDE (shown below). This is the software we will use to write programs for the Arduino. The programming language is similar to C and the IDE will compile and run the code on the Arduino. Try this simple program for blinking the LED light that comes on the Arduino board. Simply copy and paste the code into the IDE and hit the arrow or compile button. This will compile and run the code on the Arduino. Make sure the Arduino is plugged in via the USB cable and select it from menu in the header to the right of the arrow button. You should see the LED on the Arduino blink.
You are now ready to load the Arduino code we will use to read analog pin A0 that will be connected to the Atari SIO pin 8 for controlling the cassette motor. You can open the code in this text file and copy it to the Arduino IDE. When executed at the end of the project (keep reading below), this code will print to the Serial Monitor window of the IDE (see image below) “Motor OFF” when the Atari is not sending a signal to the cassette motor or “Motor ON” once you issue a POKE 54018,52 in BASIC. When on the analog values are above 1000. When off they fall to below 1000. I use this to decide whether to turn on and off the motor (see IF-ELSE statements in the Arduino code).
Third, you will need an SIO cable to deconstruct and some jumper wires. I bought this kit that included jumper wires along with some other useful components.
Fourth, prepare the SIO cable by using some wire cutters to remove the connector on one end. Remove the rubber cover on about 2-3 inches to expose the colored wires. Remove the rubber cover of the yellow wire to expose the copper. This is the one we will use to connect to the Arduino as it is used by the Atari to signal to the cassette drive to start and stop the motor.
Fifth, connect a jumper wire (I used a yellow one) to the yellow SIO wire. I just wrapped the wire tightly around the lead on the jumper wire. You could solder it for a more permanent connection. Also connect a jumper wire (I used black) to the exposed ground wire. As shown below, I then connected the yellow jumper to a breadboard (row 50, column a below). I then connect another yellow jumper from row 50 and column e of the breadboard to analog input A0 on the Arduino. Next, connect the black ground jumper to the breadboard (row 40, column a below). Connect another black jumper from row 40 and column e of the breadboard to the ground connector on the Arduino. It is highly recommended that you add a pull-down resistor (I used a 10k ohm) connecting the data input line (row 50) with the ground line (row 40). This helps stabilize the analog signal from the Atari to the Arduino. I tried it without this and the motor off function had a few second delay. Note that the breadboard and jumper wires are used so we don’t need to solder anything.
Finally, it is time to try it out. Plug in the Arduino board to your PC using the USB cable and compile the code for reading the analog in A0 pin on the board. Make sure the Serial Monitor is on. This can be accessed in the upper right of the IDE. The monitor should be printing “Motor OFF”. Now turn on the Atari with BASIC running. In BASIC, type POKE 54018,52 and hit enter. The monitor should now say “Motor ON” as in my IDE image above. That is it! You now have an Arduino reading the output of the Atari through an SIO pin!
This project was more time-consuming that I had initially imagined. The SIO port is pretty complex with scant user-friendly documentation. I can tell I would need to do a really deep dive to fully understand how it works and how to interact with it. I may explore doing a follow-up project using the joystick port.
Once I get more comfortable with my Atari-Arduino setup I plan to do some more projects using the Atari to controls DC motors and/or servos. One could imagine using it to control a modern robot of some sort perhaps even with remote control. I think that would be pretty cool.