View previous topic :: View next topic |
Author |
Message |
2m Guest
|
877 to CF card problem |
Posted: Mon Jun 20, 2005 10:57 pm |
|
|
I’ve been trying to take the first steps towards making my own simpler version of the Mpic3. Right off the bat I have a problem. I have the CF card hooked up in the standard 19-wire configuration with a 16f877 as seen in the Circuit Cellar article. After many tries to read from the card, both through my own program and from the CC article program, it has come to my attention that the address line A02 is shorted inside the card. I’ve looked over the connections and have not found any shorts in the hardware, the short is only present with the card plugged in. So I really can’t interface with the card with a third of the addressing lines always low. I can, however, read the entire card in CF drive in my computer, I filled it completely, emptied it, and formatted it with no problems. That is why I'm stumped.
I don’t understand how I could have caused in electrical damage to it since I’ve been using a straight 5v supply and since A02 should be able to handle that. I've tried it at 3.3v as well and it's still short.
Does Vs1 play into this at all or am I neglecting some simple thing, like I've managed to kill my CF card?
Sorry my post is a bit off subject. |
|
![](templates/subSilver/images/spacer.gif) |
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Tue Jun 21, 2005 5:31 am |
|
|
What do you mean with 'the address line A02 is shorted'? Shorted to what? Always low, always high or following the signal on another pin?
Which pin on the processor did you connect A02 to? Maybe you connected it to an open-drain output, or a pin that is configured for an internal device? |
|
![](templates/subSilver/images/spacer.gif) |
SLomas Guest
|
|
Posted: Tue Jun 21, 2005 8:26 am |
|
|
I have just got a PIC (18F452) interfaced to CF in a similar manner to the Circuit Cellar article. I use different pins on the PIC, but same basic operation. I bought 3 very cheap 8Mb CF cards on the grounds that if I destroyed them it didn't matter. I too came unstuck, I can read from the cards but typically if I read the 512 bytes of sector 0 which should have the AA55 (or 55AA - can't remember offhand) marker at the end I find that this is typically 6 bytes in from the end - as if the CF card had clocked data out without me reading it from the data register. This only happens with the cheap 8Mb cards, I've tried 4 other cards of varying capacities and all these are OK. I also can put the cheap cards in my PC card reader & the PC handles them without error.
It seems that there are some differences in CF cards.
I also added a 10K pullup to the Ready/Busy signal as the Sandisk document indicates this is required but this makes no difference to operation.
The only thought I had was that I was using 5V and maybe the PC card reader uses 3.3V logic. |
|
![](templates/subSilver/images/spacer.gif) |
2m Guest
|
|
Posted: Tue Jun 21, 2005 11:16 am |
|
|
The problem is between pins 18 from the CF card and pin 10 (Re2) on the 16f877.
By shorted to ground I mean that it is always low, even when the 877 has a logic high going out to that pin. If I stop the program to output an address with that pin high, like 0x07, and I measure the pin it is showing it as ground. If I disconnect that one line or pull out the CF card it will go up to the 5v it should be. I'm trying to figure out if this is normal for the CF card in any way. Like I said, I assume it's broken but it still works perfectly fine in my computer, if it wasn't for that I wouldn't have brought it up. |
|
![](templates/subSilver/images/spacer.gif) |
newguy
Joined: 24 Jun 2004 Posts: 1903
|
|
Posted: Tue Jun 21, 2005 1:10 pm |
|
|
Just a guess: could the CF card be holding that line low as an indication that it is busy, or that an error occured, or something like that?
Sounds suspiciously like how a regular character lcd will hold its D7 line high while it is busy. |
|
![](templates/subSilver/images/spacer.gif) |
2m Guest
|
|
Posted: Tue Jun 21, 2005 9:41 pm |
|
|
That was my guess as well, I just can't find anything about it. Would Vs1 have anything to do with this? That's the only thing I've thought about and not tried because I can only find sketchy info on it. |
|
![](templates/subSilver/images/spacer.gif) |
|