My source file for connecting a PIC to an IDE disk is here: test.c
It is written/developed in Hi-Tech PICC. The Hi-Tech provided delay.c and delay.h are also
part of the project.

What it does:

What it doesn't do:
The code is dependent on my hardware configuration. Here is a brief description of the
IDE bus rather than a schematic, which I will post 'later' (never):
IDE INTERFACE PART My Circuit
16 Bit Bidirectional data bus PORTB ('IDE_DATA_LOW') and PORTC ('IDE_DATA_HIGH')
3 Bit Register Address bus PORTE ('IDE_ADDR')
/WRITE PORTC bit 0 ('IDE_WR')
/READ PORTC bit 1 ('IDE_RD')
/CS0 PORTC bit 2 ('IDE_CS0')
/CS1 PORTC bit 3 ('IDE_CS1')
/RST PORTC bit 4 ('IDE_RST')


I also have a DAC connected on IDE_DATA_LOW in my app.

To understand the signals, registers, commands, which to use and when, and what the response
will be, I strongly recommend you go here:
http://www.piclist.com/techref/drives.htm
and read 'How to connect an IDE disk to a microcontroller using an 8255'. This guide is not as
complete as a standards document, but it is logical and easy to understand.

See: