Go Down

Topic: IDEFat Library for IDE Hard Drive and Mega (Read 3858 times) previous topic - next topic

gtoye

I have posted the first version of the IDEFat library at http://code.google.com/p/idefat-arduino/  This libary joins a version of the SDFat FAT32 file system code with low-level IDE hard drive access.  A total of 24 digital pins are required, requiring a Mega.

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

PaulS

A schematic for how that hard-drive is connected would be a lot more useful than that picture of spaghetti that you posted.

gtoye

A pin-out chart is provided in the README.txt file in the zip.  The photo was just to show the direct connection between the arduino and the ide cable discussed in the aforementioned README.txt.  Since no additional components are required (unless you want to add the led for drive activity) a schematic seemed unnecessary.

PaulS

Quote
A pin-out chart is provided in the README.txt file in the zip.

OK. I'm going to check this out then.

mattallen37

You must understand the HDD IDE protocol, and how HDDs work. What would be the most simple way to actively communicate with a HDD PCB, so that the spindle spins indefinitely? I don't need to access stored data, and it will be physically impossible (I removed the reading head).

Iexpress

This is awesome, I was trying to find a way to connect a mini IDE ATA hard drive up to an ATmega but wasn't sure how the buffer address is incremented inside the hard drive. Most tutorials just show reading or writing X amount of bytes for sector read/write.

fat16lib

#7
Dec 29, 2014, 11:01 pm Last Edit: Dec 29, 2014, 11:06 pm by fat16lib
Why?  PATA is a little out of date.

You can easily connect a small USB hard drive like a 1-2 TB 2.5" drive.  Here is a library.

You can plug the drive into an Mega ADK with no extra hardware.  You can use this host shield for other Arduino boards.

Iexpress

#8
Dec 30, 2014, 08:27 am Last Edit: Dec 30, 2014, 08:38 am by Iexpress
Sure bUt it's turning into fun doing it at the binary machine language level.
I'm testing it out, but only able to read the first byte of the sector or device id of the hard drive.

Any ideas on whether the drives have a set baud rate we have to read data to and from, or do we toggle the read.write pin on the hard drive with the chip select held low?

It is confusing, but being able to read the first entry of a sector and device id is pretty exciting when handling everything in binary.

I was wanting to see if I could do it the old fashioned way. It seems to working some, but not reading or writing data properly yet, though it's handing the first entry. It would be awesome to get it working with binary commands to write raw data to sectors.

Thanks

Go Up