Jump to content


Photo

Source Boost + Sd Card For 18f2550/18f4550


3 replies to this topic

#1 ppulle

ppulle

    Regular

  • EstablishedMember
  • Pip
  • 71 posts

Posted 05 March 2007 - 05:07 AM

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

#2 asmallri

asmallri

    Enthusiast

  • EstablishedMember
  • PipPip
  • 169 posts
  • Location:Western Australia

Posted 05 March 2007 - 05:52 AM

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.
Regards, Andrew

Need a file system? http://www.brushelec...p?page=software
Home of Ethernet and SD/MMC Bootloader for PICs!!

#3 ppulle

ppulle

    Regular

  • EstablishedMember
  • Pip
  • 71 posts

Posted 06 March 2007 - 04:34 AM

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.

<{POST_SNAPBACK}>



#4 asmallri

asmallri

    Enthusiast

  • EstablishedMember
  • PipPip
  • 169 posts
  • Location:Western Australia

Posted 06 March 2007 - 05:08 AM

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.
Regards, Andrew

Need a file system? http://www.brushelec...p?page=software
Home of Ethernet and SD/MMC Bootloader for PICs!!



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users