Searching \ for '[PIC] Sd card interface' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Sd card interface'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Sd card interface'
2008\07\21@184817 by threewheeler7

picon face

i have been searching around for good place to learn about the sd card SPI
interface. i will be writing this in asm and i hope to even implement the
use of the fat16 file system. so i may be able to read a file on the pic
that was written on the pc and vise versa. i am having a hard time even
finding the a good pic interface. any help would be appreciated.
--
View this message in context: www.nabble.com/Sd-card-interface-tp18579174p18579174.html
Sent from the PIC - [PIC] mailing list archive at Nabble.com.

2008\07\21@185735 by Marcel Birthelmer

flavicon
face
Hi,
I have this link bookmarked: http://www.captain.at/electronics/pic-mmc/
Basically, you'll want to use the MMC interface, but this is also
implemented by SD cards (at least for those <= 2GB, not sure about SDHC).
This is in C, but it might be good enough.
Regards,
- Marcel

On Mon, Jul 21, 2008 at 3:47 PM, threewheeler7 <spam_OUTthreewheeler7TakeThisOuTspamhotmail.com>
wrote:

{Quote hidden}

> -

2008\07\21@190325 by Zik Saleeba

face picon face
Microchip has a library which may be of use to you:

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en532040

AN1045 - Implementing File I/O Functions Using Microchip's Memory Disk Drive
File System Library

"This application note covers the usage of file I/O functions using
Microchip's memory disk drive file system library. Microchip's memory disk
drive file system is based on ISO/IEC 9293 specifications. It is also known
as the FAT16 file system, and used on earlier DOS operating systems by
Microsoft Corporation. The included source code also supports the FAT32 file
system. This is the most popular file system with SD cards, CF cards and USB
thumb drives. The applications note code is designed to run on 8-bit PIC18
devices and all 16-bit devices (PIC24F, PIC24H, dsPIC30F, dsPIC33F)."

Cheers,
Zik

On Tue, Jul 22, 2008 at 8:47 AM, threewheeler7 <.....threewheeler7KILLspamspam@spam@hotmail.com>
wrote:

{Quote hidden}

> -

2008\07\21@193330 by Harold Hallikainen

face
flavicon
face
I've used this library, and it works! It's pretty easy to configure (just
select SPI port and slave select).

Harold


{Quote hidden}

>> --

2008\07\21@193600 by threewheeler7

picon face

i do beleve that the mmc interface is the SPI interface, am i correct?

Marcel Birthelmer wrote:
{Quote hidden}

--
View this message in context: www.nabble.com/Sd-card-interface-tp18579174p18579734.html
Sent from the PIC - [PIC] mailing list archive at Nabble.com.

2008\07\21@194101 by Bob Blick

face
flavicon
face
On Mon, 21 Jul 2008 15:47:52 -0700 (PDT), "threewheeler7"
<.....threewheeler7KILLspamspam.....hotmail.com> said:
>
> i have been searching around for good place to learn about the sd card
> SPI
> interface. i will be writing this in asm and i hope to even implement the
> use of the fat16 file system. so i may be able to read a file on the pic
> that was written on the pc and vise versa. i am having a hard time even
> finding the a good pic interface. any help would be appreciated.

One trick made popular by a piclister avoids the filesystem firmware
requirement by creating one big blank file on the card(using a PC) and
then treating it like your own private play area. That way the PIC
doesn't have to deal with the FAT file system at all. Just use your own
delimiters within the file itself.

Cheerful regards,

Bob

--
http://www.fastmail.fm - Access all of your messages and folders
                         wherever you are

2008\07\21@200359 by John Coppens

flavicon
face
On Mon, 21 Jul 2008 16:35:55 -0700 (PDT)
threewheeler7 <EraseMEthreewheeler7spam_OUTspamTakeThisOuThotmail.com> wrote:

>
> i do beleve that the mmc interface is the SPI interface, am i correct?

Yes... And just to point out the largest stumbling block: all of the
filesystems use 512-byte 'sectors'. So you need a PIC with at least 512
bytes of memory to store one complete sector (which is why all the
references point to the larger PICs).

The only exception, is that you could only partially write each sector,
and then use some program in the PC to put it all together.

As far as I know, that limit is part of the SD norm, and not changeable.

John

2008\07\22@000530 by threewheeler7

picon face




John Coppens wrote:
>
>
> filesystems use 512-byte 'sectors'. So you need a PIC with at least 512
> bytes of memory to store one complete sector (which is why all the
> references point to the larger PICs).
>
>

if i need to write smaller files cant i just write it and tell the pic to
add appropriate zeros to finish off the sector?
--
View this message in context: www.nabble.com/Sd-card-interface-tp18579174p18581959.html
Sent from the PIC - [PIC] mailing list archive at Nabble.com.

2008\07\22@001423 by threewheeler7

picon face



Bob Blick-4 wrote:
>
> One trick made popular by a piclister avoids the filesystem firmware
> requirement by creating one big blank file on the card(using a PC) and
> then treating it like your own private play area. That way the PIC
> doesn't have to deal with the FAT file system at all. Just use your own
> delimiters within the file itself.
>
>

Yes Bob i actually thought of doing something like that, but i would like to
be able to read a file made by a pc a little easier rather than having to
put a specific text string in the file for the pic to look for.

--
View this message in context: www.nabble.com/Sd-card-interface-tp18579174p18582038.html
Sent from the PIC - [PIC] mailing list archive at Nabble.com.

2008\07\22@012815 by John Coppens

flavicon
face
On Mon, 21 Jul 2008 21:05:05 -0700 (PDT)
threewheeler7 <threewheeler7spamspam_OUThotmail.com> wrote:

> if i need to write smaller files cant i just write it and tell the pic
> to add appropriate zeros to finish off the sector?

Yes... Eg. you could only write 128 'data' bytes, and fill the rest with
anything. On the PC you'd have to read only the first 128 bytes.

But if  you want to write several files, you'd have to manage the
directory too, which complicates the software a lot. Easier to pre-write
a large file, then fill it with partial sector. Sort of making your
mini-filesystem inside a large file.

John

2008\07\23@131058 by Herbert Graf

flavicon
face
On Mon, 2008-07-21 at 21:03 -0300, John Coppens wrote:
> On Mon, 21 Jul 2008 16:35:55 -0700 (PDT)
> threewheeler7 <@spam@threewheeler7KILLspamspamhotmail.com> wrote:
>
> >
> > i do beleve that the mmc interface is the SPI interface, am i correct?
>
> Yes... And just to point out the largest stumbling block: all of the
> filesystems use 512-byte 'sectors'. So you need a PIC with at least 512
> bytes of memory to store one complete sector (which is why all the
> references point to the larger PICs).
>
> The only exception, is that you could only partially write each sector,
> and then use some program in the PC to put it all together.
>
> As far as I know, that limit is part of the SD norm, and not changeable.

You are correct, however you don't necessarily need a PIC with 512bytes
of RAM to get things going.

For my carmon project http://repatch.dyndns.org:8383/pic_stuff/carmon I
used a 32kB I2C EEPROM for sector storage on a 877. Works to this day
perfectly.

TTYL

More... (looser matching)
- Last day of these posts
- In 2008 , 2009 only
- Today
- New search...