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

Saving data on USB flash pen drive

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



Joined: 15 Sep 2003
Posts: 75

View user's profile Send private message

Saving data on USB flash pen drive
PostPosted: Fri Jan 25, 2008 9:58 am     Reply with quote

Hi,

I'm currently using a PIC18F6720 UART to print internal EEPROM data on an RS232 printer via a MAX232 chip which works fine.

Instead of printing the data on the printer, is it possible to replace it with a USB flash pen drive via an FTDI chip (or RS232 to USB converter cable) and save the data on the pen drive like above?

I have used pen drives on a PC and they normally save files e.g. temp.txt. However, the PIC sends out ASCII chars (not files) via the MAX232 chip. Therefore, I'm not sure how to go about saving the data. I have done no work on USB with PIC's before.

Can someone give me some pointers? Thanks.
SET



Joined: 15 Nov 2005
Posts: 161
Location: Glasgow, UK

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Fri Jan 25, 2008 10:15 am     Reply with quote

Look at the FTDI Vinculum, this is a USB Host controller.
joven



Joined: 30 Jan 2007
Posts: 56
Location: Viana do Castelo - Portugal

View user's profile Send private message

PostPosted: Fri Jan 25, 2008 10:27 am     Reply with quote

You have too MAX3421E
Ttelmah
Guest







PostPosted: Fri Jan 25, 2008 11:04 am     Reply with quote

Key, which has been mentioned here a lot of times before, is to understand that most USB devices (the flash drive, the PIC, the USB to serial adapter cable etc. etc.), are _slave_ devices. Only the PC itself is normally the USB 'master'. To talk to a pen drive requires you to implement a USB master device, and hence the chip selections suggested.
Unless you absolutely 'must' use the USB drive, it'd be a _lot_ easier to use something like an SD card, which the PIC can drive. Alternatively, use an 'off the shelf' solution (the Vinculum mentioned, is available in a 'demo' board version, - the 'VDRIVE' module, that implements USB flash, to RS232/SPI all 'off the shelf', making things vastly easier).

Best Wishes
TL



Joined: 15 Sep 2003
Posts: 75

View user's profile Send private message

PostPosted: Fri Jan 25, 2008 3:43 pm     Reply with quote

Many thanks to those who replied. As I'm using the PIC UART, it makes sense for me to use the VDRIVE2 RS232 option. I have already read some details about the VDRIVE2 and believe it will work for my application. That's fantastic! Smile
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