Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem with hard disk sector write

Status
Not open for further replies.

aramosfet

Junior Member level 2
Joined
Oct 21, 2005
Messages
22
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
Bangalore,India
Activity points
1,480
This is the mail i sent Paul Stoffregen (visit hxxp://www.pjrc.com/tech/8051/ide/index.html website about the hard disk sector write problem
can anyone help?

i recently came across your hard disk interface and thought i could use it in my mp3 player project (Using Atmel's 89C51SND1C chip).Based on your interface i connected an Atmel 89s8252 chip to the IDE bus without using 8255 , im using a seagate 4GB drive .I have been able to read sectors and issue drive spin up and spin down commands successfully.But when i write a sector it accepts 256 words of data and then remains busy forever, the status register reads D0h,reading any other command block register returns the same value,even when the drive is reset using the hardware reset pin 1 the drive remains busy and the status register reads 80h.The only option im left with is to switch off the power supply and then back on.

Another thing ive noticed is the sector count register decrements after every read sector command is executed, some times the sector count is decremented twice after reading just one sector.Also while reading the first sector(MBR) the sector count register has to be loaded with 02h ,if it is initialized with 01h the drq bit remains set even after reading a sector and is cleared only after reading more sectors(This time without writing the command to read 20h).Im also incluing the c code i have written i keil. i hope you can help, thank you
bye

keil c program for ide interface
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top