View previous topic :: View next topic |
Author |
Message |
teekaytk
Joined: 14 Jan 2005 Posts: 28
|
4 dat line sdcard mode |
Posted: Mon Jun 19, 2006 8:56 pm |
|
|
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: 1635 Location: Perth, Australia
|
|
Posted: Mon Jun 19, 2006 11:19 pm |
|
|
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
|
|
Posted: Tue Jun 20, 2006 2:26 am |
|
|
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: 1635 Location: Perth, Australia
|
|
Posted: Tue Jun 20, 2006 2:50 am |
|
|
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
|
|
Posted: Tue Jun 20, 2006 3:21 am |
|
|
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 |
|
|
|