IDE knowledge anyone?

Toby Thain toby at
Sun Dec 6 15:39:04 CST 2015

On 2015-12-06 4:14 PM, Oliver Lehmann wrote:
> Jon Elson <elson at> wrote:
>> On 12/06/2015 02:57 PM, Oliver Lehmann wrote:
>>> Hi,
>>> I've built a Harddisk-Controller-Emulator for my system which accesses
>>> a IDE (PATA) harddisk with an ATMega in PIO mode. It works like a charm
>>> except for one WD harddisk. The harddisk itself works fine with MS-DOS
>>> 6.22 and FreeBSD but refuses to work with my ATMega.
>>> On reading or writing a sector, right after the command is issued, the
>>> error bit is set in the status register, and the error register
>>> indicates
>>> an ABRT.
>> I don't have any specific knowledge of this, but it has to be a timing
>> problem.
>> Something about the timing of the command signals is just different
>> enough that the drive thinks this is wrong.  Sorry I can't give more
>> specific help.
> Thought the same and added some 400ns sleeps between each of the cylinder,
> sector, head commands and before I executed the read command... without
> success :(

I think Jon is probably on to something.

You can check out the delays in my PIO bit-banging code here:

I tested it on a few drives & spent a lot of quality time with the 
spec...of course I can't guarantee it would work for your specific 
drive, but it might give you a clue where a delay is missing.


More information about the cctalk mailing list