Go Down

Topic: floppy read (Read 4027 times) previous topic - next topic

shmc

Hi. I'm trying to read a floppy disc, using th e Arduino, but got stucked with a question: how to stream data to serial as it's read by the head? Is it possible to do it with the short memory on the uno? Tks

Grumpy_Mike

Quote
how to stream data to serial as it's read by the head?

You don't.
Data is encoded on a floppy with a system called Manchester encoding, you can't just send that to the serial port it is not of the right format and it is not the right speed.
Normally floppy discs had a whole lot of electronics in them. Are you trying to emulate that electronics like the old Apple 2 disc drives?

shmc

Thanks for your reply.
No, I don´t want to emulate. What I'm trying is to get binary data from a floppy and send it to Processing so I can feed a generative system that uses this data to draw and make sound.
I'm not really interested in getting the data readable by the operating system, just need the bytes.
If only I could get some data, store it, get more data, store it... I would be very glad because I could store it in an array and use it for drawing. I don´t need the FAT tables or files, just a continuous string of bits.
I´ve tried this code http://pastebin.com/4MtRr7A5 from Dweller, as a start. But it gives me different results on a macbookpro17"(2007) and on a Debian with a Sempron processor(old machine). I think this may be related with speed you referred. The script uses Serial.begin(115200).
Used wiring in attachment.

Grumpy_Mike

Have you looked with a scope at the sort of signal you are getting?

shmc

Don't have more than a computer and the Arduino. But if I get my hands on one how should I wire it? To the pin 30(RDATA) on floppy cable?

Grumpy_Mike

Quote
To the pin 30(RDATA) on floppy cable?

Yes
You can make one with an Arduino.
just Google arduino oscilloscpe

shmc

Didn´t know we could build one of this. Got some code from http://www.instructables.com/id/Arduino-Oscilloscope-poor-mans-Oscilloscope/ and incorporated into the Dweller´s code. Serial is running on 115200 baud. The result with the Serial.write((val >> 8) & 0xff) commented is as in the attachment. If I remove comment from that it returns 0 and 1.
For what I need this is a good start, but I want to go further: not having random track readings(related to arduino and something I got into along several restarts of the Processing program from instructables).
What is this data?

Osgeld


Quote
how to stream data to serial as it's read by the head?

You don't.
Data is encoded on a floppy with a system called Manchester encoding, you can't just send that to the serial port it is not of the right format and it is not the right speed.
Normally floppy discs had a whole lot of electronics in them. Are you trying to emulate that electronics like the old Apple 2 disc drives?


apple II would be somewhat easy as the drives are mostly dumb, 5 volt pulses for stepper movement and a serial stream  :)
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

Grumpy_Mike


Didn´t know we could build one of this. Got some code from http://www.instructables.com/id/Arduino-Oscilloscope-poor-mans-Oscilloscope/ and incorporated into the Dweller´s code. Serial is running on 115200 baud. The result with the Serial.write((val >> 8) & 0xff) commented is as in the attachment. If I remove comment from that it returns 0 and 1.
For what I need this is a good start, but I want to go further: not having random track readings(related to arduino and something I got into along several restarts of the Processing program from instructables).
What is this data?


Sorry I have no idea what you are saying. Want to try again, maybe get google translate involved.

You will only see a zero or one from this pin what do you want?
I don't understand about the restarts, is this your PC or just Processing?

shmc

I was refering to Processing restart (run). Now I get the data I want. It remains for me to know how long it takes to read a clue to create switches and advance the read head. Any idea?

shmc

Sorry, "takes to read a track to create switches "

Grumpy_Mike

If you look at the signal from the index hole that pulses every revolution. You can read a track every revolution.

shmc

I'm using a 3,5" floppy so there's no hole. How to calculate revolutions? And sync with the head read.

Go Up