Date created: Wednesday, January 23, 2013 10:12:26 PM. Last modified: Saturday, April 4, 2015 10:17:59 AM
Floppy Tones - Attempt 3 - Two Shift Registers and Two Drives
Floppy disk drives being controlled by two 8 bit shift registers. One register controlls the drive direction and the other ticks the step motor. This allows for up to 8 drives to be controlled synchronously. This is just a proof of concept, so two random frequencies are plaid on a loop.
Important note: The order of voltage changes!
Pulse the direction pin, with the step pin, to set the direction:
shiftOut(dataPin, clockPin, MSBFIRST, B00000000);
shiftOut(dataPin, clockPin, MSBFIRST, B00000011);
With the direction pin still, so its in the same direction, pulse the step pin:
shiftOut(dataPin, clockPin, MSBFIRST, B00000011);
shiftOut(dataPin, clockPin, MSBFIRST, B00000011);
Drop the voltage on the direction pin and step pin (now we have changed direction)
shiftOut(dataPin, clockPin, MSBFIRST, B00000000);
shiftOut(dataPin, clockPin, MSBFIRST, B00000000);
Pulse the step pin with the direction still low
shiftOut(dataPin, clockPin, MSBFIRST, B00000011);
shiftOut(dataPin, clockPin, MSBFIRST, B00000000);
Previous page: Floppy Tones - Attempt 2
Next page: Floppy Tones - Part 4 - H-Bridge CD ROM Drive