CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Commands to get Size of a SDCARD
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
nabeards



Joined: 27 Jun 2014
Posts: 2

View user's profile Send private message

Re: THANK YOU!
PostPosted: Fri Jun 27, 2014 6:40 pm     Reply with quote

neochrome32 wrote:
ok getting some strange resulsts mainly all zero's...

its a problem with my code, and not yet got stuck..


I, too, am in a situation where I'm getting all 0s. What was it that finally made your code start working?

Thanks!
nabeards
asmallri



Joined: 12 Aug 2004
Posts: 1663
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

Re: THANK YOU!
PostPosted: Fri Jun 27, 2014 7:26 pm     Reply with quote

nabeards wrote:
neochrome32 wrote:
ok getting some strange resulsts mainly all zero's...

its a problem with my code, and not yet got stuck..


I, too, am in a situation where I'm getting all 0s. What was it that finally made your code start working?

Thanks!
nabeards


A common mistake in hardware implementations is a missing pull-up resistor on DO of the card. This often prevents the card being put into SPI mode and, as a result, the PIC will see a floating SPI bus and not data output from the card.

Another common error is insufficient current to the card, especially during writes (high impedance power source and/or insufficient filtering and bypass capacitance on the cards power supply). This can result in a card's embedded processor resetting and, as a result, being in native mode instead of SPI mode. When the happens the PIC again sees a floating SPI bus and not the expected output from the card.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
nabeards



Joined: 27 Jun 2014
Posts: 2

View user's profile Send private message

Re: THANK YOU!
PostPosted: Fri Jun 27, 2014 8:08 pm     Reply with quote

Quote:

A common mistake in hardware implementations is a missing pull-up resistor on DO of the card. This often prevents the card being put into SPI mode and, as a result, the PIC will see a floating SPI bus and not data output from the card.

Another common error is insufficient current to the card, especially during writes (high impedance power source and/or insufficient filtering and bypass capacitance on the cards power supply). This can result in a card's embedded processor resetting and, as a result, being in native mode instead of SPI mode. When the happens the PIC again sees a floating SPI bus and not the expected output from the card.


Thanks Andrew! I'm actually able to send and receive data just fine to the card, it's just the CID and CSD that seem to be just giving me 0s. I thought it might be something particular with the stack or with the command I'm sending; I am getting the data bit but then just 0s. I tried two different-branded cards, both SDHC.

nabeards
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group