Searching \ for '%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/index.htm?key=card+interface
Search entire site for: 'Sd card interface'.

_Sub string match.
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\21@201408 by Alexandre Guimar„es

face picon face
Hi, Bob.

       Could you give some more details ? I do not remember seeing it
around at the list :-( Google also did not help a lot. I have no immediate
application for it but it is a good thing to put on the "bag of tricks" for
using someday.

>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.

Best Regards,
Alexandre Guimaraes






2008\07\21@221806 by Bob Blick

face
flavicon
face
Here:

http://repatch.dyndns.org:8383/pic_stuff/carmon/index.html

Cheerful regards,

Bob

Alexandre Guimara~es wrote:
{Quote hidden}

2008\07\21@222156 by Marcel Duchamp

picon face
I think several people mentioned doing this; one of them was me.  At
this point, I would jump into implementing a FAT16 or FAT32 system.  But
when I worked on this in the past, this method worked well enough.

I only wanted to build a datalogger that would record an incoming RS232
data line.  To avoid the FAT issues, I created a .txt file that used all
available space and had a marker string at every 512 byte sector boundary.

I used various hex file utilities found on the net to investigate the
card structure and learn how data is stored.  Then my code jumps to
about the half way point in a given card and reads a sector.  If the
string is found, then I'm too far so I did a divide and conquer method
of searching back towards the bottom of the card to get to the last
sector not yet written to.

Upload the card in a PC and read the txt file out.  My code had a few
"quick and dirty" choices made to get it done that are a bit limiting so
 it should be completely redone.  Some day.  When I have time.  Before
the end of the universe.

Alexandre Guimarães wrote:
{Quote hidden}

2008\07\21@225421 by Harold Hallikainen

face
flavicon
face
Similar to the "one big text file" approach, I made an SD/MMC card
bootloader. I store the code to be bootloaded as a hex text file on a
freshly formatted card. I edit the hex file to add a distinct string at
the start. Then, my code just reads sector by sector until it finds the
unique string. Then, it reads in a byte at a time passing it to the
bootloader. To make sure it will work, the code actually first goes
through the hex file checking the checksum on each line. If it all looked
ok, it goes back and loads the file. So, there's a way of reading a single
file from a freshly formatted MMC/SD.

Harold

--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

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.

'[PIC] RES: Sd card interface'
2008\07\22@002253 by threewheeler7

picon face



Harold Hallikainen-2 wrote:
{Quote hidden}

you know i thought of building an sd bootloader a wile back, how did it turn
out? you have a page with any details?

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

'[PIC] Sd card interface'
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...