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 reading proper sector of Compact Flash card

Status
Not open for further replies.

Hildebrandt

Newbie level 3
Joined
Jan 23, 2004
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
30
Compact Flash problems

I having an odd problem with interfacing to compact flash card.
The Identify command works perfictly.
The Read sector command seems to work except that the sector I read does not seem to be correct.

For exampel if I set the
Sector number 20h,
Cyl Low to 0
Cyl High to 0
Head to E0h (I'm using LBA mode)

With these setting I would expect to get sector 32 (20h) but I get sector 0 here (boot sector)

So far I have not been able to do any writes.
Anyone have any ideas what's going on?

Hildebrandt
 

Re: Compact Flash problems

Try _http://www.armanet.com/index.html
Select "Engineering Resources", there's PIC source code available there.
 

Re: Compact Flash problems

Just a quick update, I now can write data to the card. I found a bug in my code.

Hildebrandt
 

Re: Compact Flash problems

Oh well looks like I'm going to answer my own question, just in case anyone else is interested. The data I was looking at sector 0 is not the boot block but the master boot record which has the partition information. This information included the location of the the boot sector. Now I know, now you know.

H.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top