EmbeddedRelated.com
Forums

Dual Compact Flash datalogger slave card detection

Started by SweetCraspy November 5, 2009
Hello,

I'm attempting to modernize a datalogger by upgrading it from a 2.5 inch
IDE hard drive to two compact flash cards in a 2.5 inch IDE adapter.  My
application is actually almost identical to the one found in this thread:

http://www.embeddedrelated.com/usenet/embedded/show/97443-1.php

I have a 2.5 inch IDE to Compact Flash adapter from Addonics that has both
a master and slave CF slot.  When I populate both slots and plug it into an
external drive enclosure, my XP PC detects and can interact with both
cards.  I believe the adapter works in a Cable Select mode, because the
master's pin 28 is grounded and the slave's pin 28 is not connected to
anything.

When I plug the populated adapter into my datalogger, I can only interact
with the card in the master/Device 0 slot.  When I try to read the slave
card's status register I never get a DRDY (device ready) bit set.  

My level of interaction is with the actual device registers, i.e. setting
the number of sectors to write, giving an address to the
sector/cylinder/head registers and then issuing a Write Sector command. 
The language I'm using is C, if it matters.

I've been using the ATA-ATAPI-5 specification to try to learn how to deal
with two devices on the same IDE port, but it seems to imply that switching
devices with the DEV bit in the device/head register should just work.

Is there anything special I need to do, perhaps at startup, to get the two
cards to configure themselves properly?

Thanks much!

	   
					
---------------------------------------		
This message was sent using the comp.arch.embedded web interface on
http://www.EmbeddedRelated.com
>I believe the adapter works in a Cable Select mode, because the >master's pin 28 is grounded and the slave's pin 28 is not connected to >anything.
EDIT: Make that pin 39 for both. I was counting them like header pins. --------------------------------------- This message was sent using the comp.arch.embedded web interface on http://www.EmbeddedRelated.com
Hmmm.  It seems that my issue may have been the fault of a CF card that
does not play well with others.  

This Kingston elite pro 133X 32GB doesn't seem to like dealing with a
slave, though it's been working fine on it's own.

Thanks for reading!
	   
					
---------------------------------------		
This message was sent using the comp.arch.embedded web interface on
http://www.EmbeddedRelated.com
On Nov 5, 8:43=A0am, "SweetCraspy" <sweetcra...@gmail.com> wrote:
> Hmmm. =A0It seems that my issue may have been the fault of a CF card that > does not play well with others. =A0 > > This Kingston elite pro 133X 32GB doesn't seem to like dealing with a > slave, though it's been working fine on it's own. > > Thanks for reading! > > --------------------------------------- =A0 =A0 =A0 =A0 > This message was sent using the comp.arch.embedded web interface onhttp:/=
/www.EmbeddedRelated.com FWIW, Kingston is my *least* favorite FLASH vendor. Typical response from their tech support is "too bad". AL