PIC to CompactFlash interface programming

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi everybody!!!!

At this moment, I'm working on a PIC to CompactFlash interface an I
have decided to configure de media in True IDE Mode. I have already
looked at CompactFlash specifications and the next step would involve
the card acces programming. Is there anyone with experience in this
field?. Have you got any code examples?.

I thanks your help in advance.

DAVE

Re: PIC to CompactFlash interface programming
Quoted text here. Click to load it

Hi Dave

How about entering "PIC IDE interface" into google and look at the
various pages about this very topic?

HTH

Markus

Re: PIC to CompactFlash interface programming
PIC A COMPACTFLASH CARD   by Mark Samuels
http://www.chipcenter.com/circuitcellar/february01/c0201ms8.htm
http://www.circuitcellar.com/echips-pdfs/0201/c0201mspdf.pdf

On 18 Sep 2003 03:13:00 -0700, snipped-for-privacy@yahoo.es (David Fernandez)
wrote:
Quoted text here. Click to load it


Re: PIC to CompactFlash interface programming
g9u5dd43 snipped-for-privacy@yahoo.com wrote in message
Quoted text here. Click to load it


Ok, I have seen it yet. But in this article, CompactFlash card is
configured in Common Memory Mode, not in True IDE Mode. In addition
to this, I'm trying to acces Data Register in 8bit mode (not well
documented in CF specifications). Thank you anyway!.

Re: PIC to CompactFlash interface programming
Quoted text here. Click to load it

Well, David, if you would have run the Google search I told you in my
first answer to you, you would have found (first hit!) what you are
asking for...

Markus

Re: PIC to CompactFlash interface programming
snipped-for-privacy@yahoo.es says...
 
Quoted text here. Click to load it

Since you are not replacing an existing HD, I would not bother with True
IDE mode. In that mode your CF card is not really removable. That is,
you will have to power cycle the CF card if you remove and reinstall the
card in its slot. In Common Memory Mode, you don't have to worry about
that.

As you may have already discovered, to read data 8bits at a time, simply
read the data from offset 0 of the card register file, and repeat for as
many bytes as you are suppose to read. Typically 512.

Below is a sample of code I used long ago. I make no promise that it
actually works, but it worked for me.

Rich

------------------------------------------------------
for (i=0; i < DEVICE_WORDS_PER_SECTOR; i++)
{
  Status = CFWaitReady();
  if(Status & ERROR_MASK)
  {
    return Status;
  }    
  if(!(Status & CF_STAT_DRQ))   //check drive for errors after Read
command was issued
  {
    return CF_SHORT_READ;
  }
  *buffer++ = CFReadReg(DATA_REG);
  *buffer++ = CFReadReg(DATA_REG);
}
return Status;
------------------------------------------------------


Re: PIC to CompactFlash interface programming
HI David.

You speak spanish right?

Bueno, te comento que yo TENGO DESARROLLADO  la interfaz entre un PIC
16f877  y una compact flash.  Ademas todo esto basado en estandar ATA12
y ATA16.

Lo tengo hecho para mi tesis,  y funcionando a 8 bits, que es lo mejor.
Ademas,  lo hago andar con comandos ATA de disco duro,  pero se usa de
una manera especial.
Debo comentarte que las especificaciones dadas por los fabricantes, son
bien malas,  en particular si eres nuevo en todo esto. A mi me costo 6
meses hacer partir el sistema porque hay muchas  explicaciones que se
contradicen.

Mi mail es: snipped-for-privacy@hotmail.com y contactame via messenger, con mucho
Gusto te ayudo.

Ademas, hay que reconocer que los gringos no ayudan mucho en estos foros
porque sienten que se rompe la propiedad intelectual de ellos,  o
secretos profesionales.  A mi me da lo mismo, lo regalo al mundo.

Saludos desde chile.


Rich wrote:
Quoted text here. Click to load it


Re: PIC to CompactFlash interface programming

Quoted text here. Click to load it

http://www.circuitcellar.com/echips-pdfs/0201/c0201mspdf.pdf

Site Timeline