View previous topic :: View next topic |
Author |
Message |
pasini
Joined: 12 Dec 2005 Posts: 50 Location: Curitiba - Brazil
|
PIC18F2550(USB) + SDCARD + FAT + WINDOWS |
Posted: Mon Aug 21, 2006 7:40 am |
|
|
MPLAB 7.1 CCS 3.235
Hi all,
I have a PIC18F2550 connected to an SDCARD by the SPI interface. I want to connect the SDCARD to the PC to be used as a PEN-DRIVE, USB interface.
How can I do this ? I can implement FAT12/16 or 32 to the SDCARD, but how do I translate data from the card to the PC ? How will I receive data fromthe USB/PC and read/write it to the files in the card ?
I have some experience with USB as a serial interface but not as a memory.
Any help, advice or example codes are wellcome.
Thanks in advance,
Pasini |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Mon Aug 21, 2006 9:54 am |
|
|
If at the PC end, you are going to use an existing USB interface to a 'Pen drive', as a 'mass storage' device, then the PC, will already be handling FAT. If you want the PC to access the device as sequential 'memory', then you will need to think again about what USB device you implement. If the SDCARD, does not ever need to be readable by a PC directly, and you want to modify the data from the PIC, as well as handling the 'pass through', then you would find it much simpler, to interface a bulk I/O device, and write to the card using your own format, rather than FAT.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
pasini
Joined: 12 Dec 2005 Posts: 50 Location: Curitiba - Brazil
|
|
Posted: Mon Aug 21, 2006 10:07 am |
|
|
Actually, the SDCard memory will be a pen-drive. PIC MCU will not need to read/write any other kind of data.
My project has a RS232-to-USB serial interface in one USB logic channel, working as an Communication Device Class. Ok, this is working.
The other part is the SDCard memory that will be a pen-drive. in this case, I need a FAT-12/16 or 32, ok ? But how do I receive data from the computer, and how do I read/write to the memory ? The card is in SPI mode.
Thanks
Pasini |
|
![](templates/subSilver/images/spacer.gif) |
dmendesf
Joined: 31 Dec 2005 Posts: 31
|
|
![](templates/subSilver/images/spacer.gif) |
sjbaxter
Joined: 26 Jan 2006 Posts: 141 Location: Cheshire, UK
|
|
Posted: Tue Aug 22, 2006 4:09 am |
|
|
Have a read of Microchips Application Note:
USB Mass Storage Device
it should give you some ideas.
The schematics and sources are all available if you hunt around on the Microchip site. _________________ Regards,
Simon. |
|
![](templates/subSilver/images/spacer.gif) |
ratgod
Joined: 27 Jan 2006 Posts: 69 Location: Manchester, England
|
|
Posted: Wed Apr 30, 2008 11:38 pm |
|
|
Out of curiosity, has anyone got a version up and running yet? |
|
![](templates/subSilver/images/spacer.gif) |
|