Pages: [1]   Go Down
Author Topic: floppy read  (Read 3726 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34210
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* DSCN1550.JPG (1519.05 KB, 2148x1611 - viewed 67 times.)
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34210
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34210
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
To the pin 30(RDATA) on floppy cable?
Yes
You can make one with an Arduino.
just Google arduino oscilloscpe
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 >> smiley-cool & 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?


* floppy_data.png (138.54 KB, 1454x801 - viewed 63 times.)
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley
Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34210
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 >> smiley-cool & 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?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34210
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: