SD Card inferface
2004-07-20 by wildmojo2003
Yahoo Groups archive
Index last updated: 2026-04-28 23:31 UTC
Thread
2004-07-20 by wildmojo2003
I'm looking to use SD card in a datalogging application. I am trying to research how much code space will be needed to support the SD card. I want to be able to read the data off of the card with a normal card reader. Anyone has experience with this? Joe
2004-07-20 by Lasse Madsen
Hi Joe, I have done this (Made a commercial FAT16 library) in an AVR microcontroller it consumed approx 20KiloBytes of code written in ANSI C. I cannot share the code I'm afraid as its intellectual property of my former employer, but there are some source code solutions available like www.prllc.com I know for a fact that theirs work (I have tried it once). Best regards Lasse Madsen
-----Original Message----- From: wildmojo2003 [mailto:jhlebasko@...] Sent: 20. juli 2004 23:56 To: lpc2000@yahoogroups.com Subject: [lpc2000] SD Card inferface I'm looking to use SD card in a datalogging application. I am trying to research how much code space will be needed to support the SD card. I want to be able to read the data off of the card with a normal card reader. Anyone has experience with this? Joe Yahoo! Groups Links
2004-07-21 by RobbingPeter
--- In lpc2000@yahoogroups.com, "wildmojo2003" <jhlebasko@i...>
wrote:
> I'm looking to use SD card in a datalogging application. I am
trying
> to research how much code space will be needed to support the SD
card.
> I want to be able to read the data off of the card with a normal
card
> reader. Anyone has experience with this?
It is definitely possible using SPI mode. Not all MMC cards
implement SPI mode, but most do -- I only have one card that doesn't.
In my application I read bits out of file on a FAT-formatted card in
order to program an FPGA. The fpga bits are written to the card
using XP and a dongle. My LPC2106 board also writes bits into
files on the card, which can later be read using XP.
Here's the size for the bulk of the code:
ch@laptop-vmware:~/src/rc2106$ size mmc.o spi.o fat.o crc.o
text data bss dec hex filename
4624 192 0 4816 12d0 mmc.o
496 0 0 496 1f0 spi.o
4144 4 512 4660 1234 fat.o
192 0 0 192 c0 crc.o
ch@laptop-vmware:~/src/rc2106$
I can't share the code unfortunately at the moment. Perhaps in the
future.
Cheers,
-ch2004-07-22 by wildmojo2003
Lasse, Thanks for the response. The source code solution from www.prllc.com is it suitable to be ported to a different MCU? Joe --- In lpc2000@yahoogroups.com, "Lasse Madsen" <lm@e...> wrote:
> Hi Joe, > > I have done this (Made a commercial FAT16 library) in an AVR > microcontroller it consumed approx 20KiloBytes of code written in ANSI > C. > > I cannot share the code I'm afraid as its intellectual property of my > former employer, but there are some source code solutions available like > www.prllc.com I know for a fact that theirs work (I have tried it once). > > > Best regards > Lasse Madsen > >
2004-07-22 by Lasse Madsen
Yes its VERY easy to port you only have to alter it one place and it's all written in ANSI C so it requires a minimal effort. I have purchased it my self and ported it to some different processors with much success ! Best regards Lasse Madsen
-----Original Message----- From: wildmojo2003 [mailto:jhlebasko@...] Sent: 22. juli 2004 17:19 To: lpc2000@yahoogroups.com Subject: [lpc2000] Re: SD Card inferface Lasse, Thanks for the response. The source code solution from www.prllc.com is it suitable to be ported to a different MCU? Joe --- In lpc2000@yahoogroups.com, "Lasse Madsen" <lm@e...> wrote: > Hi Joe, > > I have done this (Made a commercial FAT16 library) in an AVR > microcontroller it consumed approx 20KiloBytes of code written in ANSI > C. > > I cannot share the code I'm afraid as its intellectual property of my > former employer, but there are some source code solutions available like > www.prllc.com I know for a fact that theirs work (I have tried it once). > > > Best regards > Lasse Madsen > > Yahoo! Groups Links
2004-07-22 by wildmojo2003
Lasse, Again thanks for information. Are the commands to the SD and MMC freely available or is a license requried? I've tried the sdcard.org and sdcard.com sites but the closest I can find is the licensing application. Joe --- In lpc2000@yahoogroups.com, "Lasse Madsen" <lm@e...> wrote:
> Yes its VERY easy to port you only have to alter it one place and it's > all written in ANSI C so it requires a minimal effort. > > I have purchased it my self and ported it to some different processors > with much success ! > > Best regards > Lasse Madsen >
2004-07-22 by haack0815
Hi Joe, take a look at www.open-research.org.uk/ARMuC/index.cgi?SD_Card I hope that will help you. Andreas --- In lpc2000@yahoogroups.com, "wildmojo2003" <jhlebasko@i...> wrote:
> Lasse, > Again thanks for information. > > Are the commands to the SD and MMC freely available or is a license > requried? I've tried the sdcard.org and sdcard.com sites but the > closest I can find is the licensing application. > > Joe > > --- In lpc2000@yahoogroups.com, "Lasse Madsen" <lm@e...> wrote: > > Yes its VERY easy to port you only have to alter it one place and it's > > all written in ANSI C so it requires a minimal effort. > > > > I have purchased it my self and ported it to some different processors > > with much success ! > > > > Best regards > > Lasse Madsen > >
2004-07-22 by atmelbr
Lasse,
The code is SPI mode,SD card mode or both ?
Regards,
Marcio Montenegro
> --- In lpc2000@yahoogroups.com, "Lasse Madsen" <lm@e...> wrote:
> > Yes its VERY easy to port you only have to alter it one place and
it's
> > all written in ANSI C so it requires a minimal effort.
> >
> > I have purchased it my self and ported it to some different
processors> > with much success ! > > > > Best regards > > Lasse Madsen > >
2004-07-22 by Lasse Madsen
Hi Marcio, The code is written for a SPI uart (MISO,MOSI,SCK) in the AVR processor so I would guess SPI if what you refer as SD mode is the special "parallel transfer" mentioned in the SD CARD manual from Sandisk. Best regards l. madsen
-----Original Message-----
From: atmelbr [mailto:atmelbr@...]
Sent: 22. juli 2004 22:04
To: lpc2000@yahoogroups.com
Subject: [lpc2000] Re: SD Card inferface
Lasse,
The code is SPI mode,SD card mode or both ?
Regards,
Marcio Montenegro
> --- In lpc2000@yahoogroups.com, "Lasse Madsen" <lm@e...> wrote:
> > Yes its VERY easy to port you only have to alter it one place and
it's
> > all written in ANSI C so it requires a minimal effort.
> >
> > I have purchased it my self and ported it to some different
processors
> > with much success !
> >
> > Best regards
> > Lasse Madsen
> >
Yahoo! Groups Links2004-07-22 by Jan Szymanski
--- In lpc2000@yahoogroups.com, "Lasse Madsen" <lm@e...> wrote: > Hi Marcio, > > The code is written for a SPI uart (MISO,MOSI,SCK) in the AVR processor > so I would guess SPI if what you refer as SD mode is the special > "parallel transfer" mentioned in the SD CARD manual from Sandisk. > > Best regards > l. madsen > > -----Original Message----- > From: atmelbr [mailto:atmelbr@y...] > Sent: 22. juli 2004 22:04 > To: lpc2000@yahoogroups.com > Subject: [lpc2000] Re: SD Card inferface > > Lasse, > The code is SPI mode,SD card mode or both ? > Regards, > Marcio Montenegro > > > --- In lpc2000@yahoogroups.com, "Lasse Madsen" <lm@e...> wrote: > > > Yes its VERY easy to port you only have to alter it one place and > it's > > > all written in ANSI C so it requires a minimal effort. > > > > > > I have purchased it my self and ported it to some different > processors > > > with much success ! > > > > > > Best regards > > > Lasse Madsen > > > > > > > > > Yahoo! Groups Links It looks like only SPI/MMC mode specifications for SD cards are freely available . I tried many times to contact people behind sdcards.org with a questions about specifications and if it is legal to use SD cards, but had no luck. Can anyone come across any specifications for file system (FAT16) on SD cards ? Does anyone know if it is legal to use SD card in embedded systems without a licence (as it is still unclear to me) ?
2004-07-22 by Joe Hlebasko
My understanding (from sdcard.org) is that to use SD card without the copyright protection is OK without license. To use the SD card with copyright protection requires a license. I think I have a found enough information on the FAT16 file system to write my own FAT file system. But I have yet to find a specification that list what commands are needed to read/write data from SD or MMC. Some of the docs say use 'CMD0' to do this, but it does not say that 'CMD0' == 0x00. This is the information that I seek. I have found enough documentation on the elctrical (SPI) interface. On some of the code I have found that works with MMC is that card uses a lot of magic numbers w/o much comments. So unless I can find this last bit of information it looks like I will purchase a license from www.prllc.com This will most likely save me time in the long run. Joe
> -----Original Message----- > From: Jan Szymanski [mailto:janek@...] > Sent: Thursday, July 22, 2004 6:15 PM > To: lpc2000@yahoogroups.com > Subject: [lpc2000] Re: SD Card inferface > > --- In lpc2000@yahoogroups.com, "Lasse Madsen" <lm@e...> wrote: > > Hi Marcio, > > > > The code is written for a SPI uart (MISO,MOSI,SCK) in the AVR > processor > > so I would guess SPI if what you refer as SD mode is the special > > "parallel transfer" mentioned in the SD CARD manual from Sandisk. > > > > Best regards > > l. madsen > > > > -----Original Message----- > > From: atmelbr [mailto:atmelbr@y...] > > Sent: 22. juli 2004 22:04 > > To: lpc2000@yahoogroups.com > > Subject: [lpc2000] Re: SD Card inferface > > > > Lasse, > > The code is SPI mode,SD card mode or both ? > > Regards, > > Marcio Montenegro > > > > > --- In lpc2000@yahoogroups.com, "Lasse Madsen" <lm@e...> wrote: > > > > Yes its VERY easy to port you only have to alter it one place > and > > it's > > > > all written in ANSI C so it requires a minimal effort. > > > > > > > > I have purchased it my self and ported it to some different > > processors > > > > with much success ! > > > > > > > > Best regards > > > > Lasse Madsen > > > > > > > > > > > > > > > > Yahoo! Groups Links > > It looks like only SPI/MMC mode specifications for SD cards > are freely available . > I tried many times to contact people behind sdcards.org with > a questions about specifications and if it is legal to use SD > cards, but had no luck. > Can anyone come across any specifications for file system > (FAT16) on SD cards ? > Does anyone know if it is legal to use SD card in embedded > systems without a licence (as it is still unclear to me) ? > > > > ------------------------ Yahoo! Groups Sponsor > --------------------~--> Yahoo! Domains - Claim yours for > only $14.70 http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/dN_tlB/TM > -------------------------------------------------------------- > ------~-> > > > Yahoo! Groups Links > > > > > >
2004-07-22 by Joe Hlebasko
Thanks for referring me back to this page. I had skimmed the docs listed here. Alas I did not skim deep enough though. These links did lead me to the information I was searching for! Thanks. Joe
> -----Original Message----- > From: haack0815 [mailto:lpc_arm@...] > Sent: Thursday, July 22, 2004 1:28 PM > To: lpc2000@yahoogroups.com > Subject: [lpc2000] Re: SD Card inferface > > Hi Joe, > > > take a look at www.open-research.org.uk/ARMuC/index.cgi?SD_Card > I hope that will help you. > > Andreas > > --- In lpc2000@yahoogroups.com, "wildmojo2003" <jhlebasko@i...> wrote: > > Lasse, > > Again thanks for information. > > > > Are the commands to the SD and MMC freely available or is a license > > requried? I've tried the sdcard.org and sdcard.com sites but the > > closest I can find is the licensing application. > > > > Joe > > > > --- In lpc2000@yahoogroups.com, "Lasse Madsen" <lm@e...> wrote: > > > Yes its VERY easy to port you only have to alter it one place and > > > it's all written in ANSI C so it requires a minimal effort. > > > > > > I have purchased it my self and ported it to some different > > > processors with much success ! > > > > > > Best regards > > > Lasse Madsen > > > > > > > ------------------------ Yahoo! Groups Sponsor > --------------------~--> Yahoo! Domains - Claim yours for > only $14.70 http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/dN_tlB/TM > -------------------------------------------------------------- > ------~-> > > > Yahoo! Groups Links > > > > > >
2004-07-23 by frankpoplonski
--- In lpc2000@yahoogroups.com, "Joe Hlebasko" <jhlebasko@i...> wrote: > Thanks for referring me back to this page. I had skimmed the docs listed > here. Alas I did not skim deep enough though. These links did lead me to > the information I was searching for! > > Thanks. > > Joe > > > -----Original Message----- > > From: haack0815 [mailto:lpc_arm@s...] > > Sent: Thursday, July 22, 2004 1:28 PM > > To: lpc2000@yahoogroups.com > > Subject: [lpc2000] Re: SD Card inferface > > > > Hi Joe, > > > > > > take a look at www.open-research.org.uk/ARMuC/index.cgi?SD_Card > > I hope that will help you. > > > > Andreas > > > > --- In lpc2000@yahoogroups.com, "wildmojo2003" <jhlebasko@i...> wrote: > > > Lasse, > > > Again thanks for information. > > > > > > Are the commands to the SD and MMC freely available or is a license > > > requried? I've tried the sdcard.org and sdcard.com sites but the > > > closest I can find is the licensing application. > > > > > > Joe > > > > > > --- In lpc2000@yahoogroups.com, "Lasse Madsen" <lm@e...> wrote: > > > > Yes its VERY easy to port you only have to alter it one place and > > > > it's all written in ANSI C so it requires a minimal effort. > > > > > > > > I have purchased it my self and ported it to some different > > > > processors with much success ! > > > > > > > > Best regards > > > > Lasse Madsen > > > > > > > > > > > > ------------------------ Yahoo! Groups Sponsor > > --------------------~--> Yahoo! Domains - Claim yours for > > only $14.70 http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/dN_tlB/TM > > -------------------------------------------------------------- > > ------~-> > > > > > > Yahoo! Groups Links > > > > > > > > > > > > Hi Jo, try http://www.sandisk.com/oem/ I hope that will help. Frank