Jump to content
ppulle

Source Boost + Sd Card For 18f2550/18f4550

Recommended Posts

ppulle    0

Hi,

I'm looking for any examples of implenting a simple FAT file system on a SD/MMC card connected to 18F2550/18F4550 device, including schematics if possible.

 

I know of Microchips AN1003, which is a little too complex, I'm after something to do some simple data logging, pull the card out and read it in a PC.

 

I've also read EPE mags November 2006/Decemeber 2007 Pic'N'Mix columns which show something like what I'm after, all in assembly though....I was wondering if anyone has done a Sourceboost version.

 

Thanks

Phil

Share this post


Link to post
Share on other sites
asmallri    0
Hi,

I'm looking for any examples of implenting a simple FAT file system on a SD/MMC card connected to 18F2550/18F4550 device, including schematics if possible.

 

A contradition in terms. Would you like FAT or Simple?

 

You can download working reference schematics from my web site on the projects page.

 

I know of Microchips AN1003, which is a little too complex, I'm after something to do some simple data logging, pull the card out and read it in a PC.

 

AN1003 does NOT implement FAT. You cannot pull the card out of the AN1003 hardware implementation and read it on a PC. The PC must read the card via the AN1003 code implemented on the PIC.

 

I've also read EPE mags November 2006/Decemeber 2007 Pic'N'Mix columns which show something like what I'm after, all in assembly though....I was wondering if anyone has done a Sourceboost version.

 

I have implementations of SD/MMC card utilities and SD/MMC card file system for CCS and Microchip C18 compilers. They are not free but they are are not expensive considering it is around 5000 lines of code (with sample data logger application).

 

An alternative you might consider is to format an SD/MMC card on a PC and then create a single file of nothing of the desired length (1G for example). What this will do is create a file of contiguous sectors on the media. With this scenario, you do not really need a full fat implementation, you have to be able to discover the start sector of the file but after that you just keep going from sector to sector. There is no need to keep and maintain file system data structures, instead you need to maintain some simple pointers. PC software will be able to read the file.

Share this post


Link to post
Share on other sites
ppulle    0

Hi Andrew,

Thanks for the advice, your comment on simply creating the file using the PC and navigating along that will do fine for my initial application.

 

Noted are the licencing requirements for commercial implementation, didn't think of that. Fortunately at the moment I'm using banks of eeprom chips (for size, SD/MMC are too big) for my commercial apps, just exploring the use of SD/MMC right now.

 

Also noted are your comments on the AN1003 implementation. From a cursory read I had thought that they were simply passing/re-interpreting SCSI commands from the PC to the card, from your advice it looks like they are not using a file system on the card. Bit of a pointless app note in that regards.

 

One question, on the schematic, it's clear that you're level shifting the signal lines to the SD card because your processor is running at 5V.....is this necessary if I'm running my processor at 3.3V (I'm guessing not)?

 

Thanks

Phil

 

Hi,

I'm looking for any examples of implenting a simple FAT file system on a SD/MMC card connected to 18F2550/18F4550 device, including schematics if possible.

 

A contradition in terms. Would you like FAT or Simple?

 

You can download working reference schematics from my web site on the projects page.

 

I know of Microchips AN1003, which is a little too complex, I'm after something to do some simple data logging, pull the card out and read it in a PC.

 

AN1003 does NOT implement FAT. You cannot pull the card out of the AN1003 hardware implementation and read it on a PC. The PC must read the card via the AN1003 code implemented on the PIC.

 

I've also read EPE mags November 2006/Decemeber 2007 Pic'N'Mix columns which show something like what I'm after, all in assembly though....I was wondering if anyone has done a Sourceboost version.

 

I have implementations of SD/MMC card utilities and SD/MMC card file system for CCS and Microchip C18 compilers. They are not free but they are are not expensive considering it is around 5000 lines of code (with sample data logger application).

 

An alternative you might consider is to format an SD/MMC card on a PC and then create a single file of nothing of the desired length (1G for example). What this will do is create a file of contiguous sectors on the media. With this scenario, you do not really need a full fat implementation, you have to be able to discover the start sector of the file but after that you just keep going from sector to sector. There is no need to keep and maintain file system data structures, instead you need to maintain some simple pointers. PC software will be able to read the file.

Share this post


Link to post
Share on other sites
asmallri    0
One question, on the schematic, it's clear that you're level shifting the signal lines to the SD card because your processor is running at 5V.....is this necessary if I'm running my processor at 3.3V (I'm guessing not)?

 

The level shifting is for 5 volt PICs. If you look at the PIC18F97J60 reference schematic (3.3 volt PIC) you will see there is no level shifting.

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×