Friday, November 7, 2008

Concept tiem...

I ordered the Arudido Decimilla or whatever the new one is. It's basically an AVR development kit. I got to thinking of what I'd actually do with it... and I figured out I could make a USB/serial floppy controller.

The Decimilla has 14 pins, two of which are wired up to the USB convertor, and 4 more wired up to the SPI port, which I might have a use for later... think SD card-based floppy emulator. Although controlling it would be a bitch since there'd be no wires. I'd still have to use USB to control it, which would kinda defeat the point. I guess it would be a nice proto for something based around a microcontroller with more pins.

Ideally one would use a CPLD to handle the timing, but I'm going to be very cheap and just use the AVR. So I had to think about it more, and realized that it would be relatively easy - at least for reading. The AVR can track the transitions from 0 to 1, note the cycle count between them, and compare them with computed timings to see how long it was between said transitions. The AVR will even trigger an interrupt on any 0<->1 transition, so the code should actually be straightforward.

Writing will be another story however... no way to avoid writing a timing loop for that - the floppy cable doesn't carry a clock signal.

It looks like there are enough pins on the Arduino to handle the floppy drive w/o multiplexing. But not an early MFM hard drive. ;)

The nice thing about that is that it should pretty much be able to read any disk format, with any bitrate. It should even adjust for the Mac's 800k variable-speed-written disks... unless the drive just doesn't care to feed it the data.

Another thing I could do with it would be to bridge to an Atari 800 SIO interface. I don't know if I could actually do the FM decoding in the AVR, so perhaps that'll be another project. Or more likely I'll just link it to the PC...

OBinteresting: The Wiimote uses the standard I2C bus for it's accessories. Any microcontroller worth anything also supports I2C. So you can easily do something like this: http://www.windmeadow.com/node/37 and use a Wiimote as a bluetooth transmitter.

Finally, for something much easier to read and learn how the arduino environment works, go here: http://www.ladyada.net/learn/arduino/ (thanks June!)

No comments: