CF cards on classic machines (was Re: Another disk imaging
project)
Ethan Dicks
ethan.dicks at gmail.com
Fri Aug 5 10:24:33 CDT 2005
On 8/5/05, Jim Brain <brain at jbrain.com> wrote:
> The IDE command registers are all 8-bits wide, but the Data register is
> 16 bits wide. You have to support a 16 bit transfer in order to get the
> data from the sector buffer (256 16 bit transfers nets you 512 bytes of
> data, the IDE std sector). IN the newer 48 bit addressing mode, the LBA
> registers grow from 8 bits to 16 bits as well.
>
> All the IDE code I've looked at does it this way. I believe I have the
> ATA r4 spec here that states that as well.
>
> But, if you've noted a way to switch IDE into 8-bit mode, let me know.
This is not an ATA feature I'm talking about, it's a CF feature...
>From http://www.compuphase.com/mbr_fat.htm ...
you can switch the Compact Flash card to use only 8-bit transfers, in
case you need to connect the Compact Flash card to an 8-bit bus.
Accessing a drive takes the following steps:
1. The address is asserted on lines A0-A2 and /CS0 + /CS1. In True
IDE mode, only three of the address lines of the Compact Flash card
are used, in combination with the /CS0 and /CS1 lines which select the
"register set". Only either of the /CS0 and /CS1 lines is active (not
both at the same time).
2. After a delay of 70 ns (or more), either the /IORD or /IOWR is
activated, depending on whether you want to initiate a read or write
instruction. The /IORD or /IOWR are the strobes.
3. Another delay, of 165 ns, is needed before inactivating the
/IORD or /IOWR lines. At the same time of inactivating the strobe, or
immediately before or after inactivating the strobe, you can read or
write the data to the D0-D15 lines.
4. Although this is optional, it is recommended that both /CS0 and
/CS1 are inactivated at the end of the read or write cycle. You may
need another delay here, because a full cycle has also a minimal
duration. Instead of a simple idle loop, you may however choose to
perform other operations in that time --such as interpreting the data
after a read operation, or fetching new data after a write operation.
So... again, the problems I'm having are with certain cards and not
others. My records of success are 4MB HP - fail, 16MB Kodak - strange
behavior/fail, 512MB Simple Technology - fail, SanDisk 1GB - works.
I'm just trying to solicit input from anyone who might know a tidbit
like "don't try that with cards under 32MB" or some other such nugget
of wisdom. I brought up the 8-bit mode thing because it's an unusual
use of the CF card and might be relevant.
Thanks,
-ethan
More information about the cctalk
mailing list