CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

SD-card -> µC ->USB -> PC

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
JayKay
Guest







SD-card -> µC ->USB -> PC
PostPosted: Fri Jul 03, 2009 3:59 am     Reply with quote

Hi everybody!
My problem is the following: My µC (PIC18LF4620) is getting data and writes these on a SD Card (1KB file, FAT). On the board is also a FTDI FT232, which connects the PIC and the mini-USB.
I'd like Windows to use the board via the mini-USB as a mass storage device, to access the file on th SD card.
As I got thrown in at the deep end, I don't have a clue. How do I tackle this problem? Is it very complex or are a few lines of additional code enough?
Maybe anyone of you had a similar problem. I'm using the CCSC compiler... Thank you in advance!
andrewg



Joined: 17 Aug 2005
Posts: 316
Location: Perth, Western Australia

View user's profile Send private message Visit poster's website

PostPosted: Sat Jul 04, 2009 11:42 pm     Reply with quote

The FTDI chip is serial-port only. It cannot do mass storage. You will need a new board design to handle mass storage.

The Vinculum (never used it myself) claims to support both serial port and mass storage.

Microchip have some source code on their web site that implements mass storage. It doesn't work with CCS, though. You'd probably also need to switch to a USB-capable micro. It would be more work to have both mass-storage support and serial port support available at the same time, if you need that.
_________________
Andrew
Guest








PostPosted: Mon Jul 06, 2009 7:45 pm     Reply with quote

Maxim just came out with a chip specifically for this - a direct SD card to USB bridge chip. MAX14500

Might be something to look into...

HTH - Steve H.
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Tue Jul 07, 2009 12:27 am     Reply with quote

Quote:
The Vinculum (never used it myself) claims to support both serial port and mass storage.
Vinculum implements a host rather than a device interface.

Quote:
Microchip have some source code on their web site that implements mass storage. It doesn't work with CCS, though.
No C18 code can be expected to work with CCS without modifications. Nevertheless, the code can be ported. Or do you know of particular CCS C limitation that reveal when porting the said code?

Generally, implementing an USB mass storage device interface in an embedded system makes sense, if you intend a functionality, that isn't provided by a standard USB to flash memory or SD card bridge. The Microchip data logger project is a typical example.

But it's a complex project, not just a few additional lines of code.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group