Wednesday, February 08, 2017

Arduino TPDD (Tandy Portable Disk Drive) project

Because I'm a glutton for punishment, and because I love old tech, I created a project for myself.

I've always loved the Tandy 100/102, but by the time I could afford one, they were gone from the market.  Later, I had the money, but not the time.  Now I have the time and the money, so I picked up some second hand ones from eBay and enjoyed the feel old old time computing.

But one thing that I wanted was a nice, more modern, way to store my data.  Club 100 used to sell a NADS box, but no longer.  So I figured I could create one myself.

The ingredients:
An Arduino Uno R3
I needed to hook it to my Tandy 102, which only supports RS-232 serial, not the TTL serial that the Arduino supports, so I picked up an RS-232 Shifter.  This converts RS-232 to TTL.
I also needed something to store the files on, so I picked up a MicroSD shield for the Arduino.

Now, for the software.  Luckily, someone already wrote a TPDD emulator called DLPlus which works under Linux and you can get the source code for.

The hardware hooked up easily and it didn't take me too long to get the communication working. After about 1/2 a day, I was able to send a TPDD command from my 102 to the Arduino and have the Arduino parse the command and validate the checksum.

Then I soldered up the MicroSD shield, set up a SD card, and started to get that part working on the Arduino.

Problems.  I knew that this was going too smoothly.

To make a long story short, the problem was the SD library for the Arduino uses up A LOT of stack space on the Arduino (we only have 2K of it).  So while the program itself was well under the 32K limit, adding the SD card code hit the stack space limit when the program ran.

Dead end.

I have a Arduino Mega on order from Adafruit.  That has 8K of stack space.   We'll see what happens when it arrives and I get it working.

No comments: