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

4 dat line sdcard mode

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
teekaytk



Joined: 14 Jan 2005
Posts: 28

View user's profile Send private message

4 dat line sdcard mode
PostPosted: Mon Jun 19, 2006 8:56 pm     Reply with quote

is it possible to write to SD Card using the 4 dat line mode. if so can someone share the code example.
will it significantly improve write speeds compared to spi mode? i am worried about crc calcuation on 4 dats
pls help
thanks

TK
asmallri



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

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

PostPosted: Mon Jun 19, 2006 11:19 pm     Reply with quote

Quote:
will it significantly improve write speeds compared to spi mode?


Yes this is significantly faster than SPI mode but you have to put it in context. Is your PIC currently capable of saturating the existing SPI bus to the SD card? Here is a hint - the answer is no.

In which case is the complexity justified in moving from SPI to native mode?
_________________
Regards, Andrew

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








PostPosted: Tue Jun 20, 2006 2:26 am     Reply with quote

my application requires an ultra low power device that wakes up the sdcard, ini it, write to it and turn it of again. As battery life is limited and the sd card takes 70ma in write in any of the write modes, i thought i could save some power in 4 dat mode. but you are rite, whatever i do i cant even saturate the spi bus mode. I have CCS code that is currently working with the sdcard in spi mode. will using a faster pic (like one of the new j10 devices) be any significat gain. currently i am using 18f8720 at 16mhz and 3.6V

thanks
asmallri



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

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

PostPosted: Tue Jun 20, 2006 2:50 am     Reply with quote

The SD card will support a 25MHz SPI bus. My 18F PIC upper limit on SPI speed is 10MHz although some (with embedded USB support) can drive it at 12MHz.

If you look at the way the SD card operates, the current consumption occurs when it is doing something - i.e the internal controller is performing a read write. I just measured the current consumption of one of my data loggers with a 1G SD card inserted (and powered up) and without it. The card made a difference of just 1mA.

The real current consumption occurs during the write operation however this is independant of the interface (SPI or native) You send the internal controller instructions over either interface, once the internal controller receives the command it then issues the write to the internal memory. The actual time to execute the commands internally is identical and therefore the real current is consumed, is identical.

Bottom line - no need to complicate things - stay with SPI.
_________________
Regards, Andrew

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








PostPosted: Tue Jun 20, 2006 3:21 am     Reply with quote

thanks
I'll take your advice and stick to SPI. 1ma background current for me is too much, currently the board takes lessthan 10 microamps on idle.

But you are right, no use compilcating the situation

thanks again

takecare

TK
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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