the compactflash true ide mode access

Hi, friends, I wrote a module to access the compactflash in true ide mode (pio0), the status register. the clock frequence is 50Mhz, every time I try to read, I got 0x54 from the cf_data, I think I should get 0x50 if it works right. What is wrong with me?? Thanks a lot!

following is the code:

wire cf_oe=1'b0; wire cf_reg=1'b1; wire cf_we=1'b1; wire cf_dasp=1'b1;

parameter pio0_t1=5'd5, pio0_t2=5'd22, pio0_t3=5'd23, pio0_t4=5'd30;

reg [4:0] cfcnt; always @(posedge clk or negedge reset) if (~reset) cfcnt

Reply to
NoThisRAT
Loading thread data ...

Hi, all I have found the problem, wrong pin assignment :(

Thanks!

Reply to
NoThisRAT

I don't know for sure that anything is wrong here, 0x54 means it's not busy, seek is complete, and it's ready to talk. Having the DRQ on - the four - doesn't seem like a problem to me, though I just modified my project to check and I'm finding that the actual IDE disk I'm using powers on to report 0x80 and then 0x50 when no commands have yet been sent. Have you tried sending it commands? Identify is a simple one, otherwise set up a read command. You may need to select the device first with a write to the head register though.

Did you reset it?

Chris

Reply to
Chris Stratton

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.