View previous topic :: View next topic |
Author |
Message |
TL
Joined: 15 Sep 2003 Posts: 75
|
Saving data on USB flash pen drive |
Posted: Fri Jan 25, 2008 9:58 am |
|
|
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
|
|
Posted: Fri Jan 25, 2008 10:15 am |
|
|
Look at the FTDI Vinculum, this is a USB Host controller. |
|
|
joven
Joined: 30 Jan 2007 Posts: 56 Location: Viana do Castelo - Portugal
|
|
Posted: Fri Jan 25, 2008 10:27 am |
|
|
You have too MAX3421E |
|
|
Ttelmah Guest
|
|
Posted: Fri Jan 25, 2008 11:04 am |
|
|
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
|
|
Posted: Fri Jan 25, 2008 3:43 pm |
|
|
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! |
|
|
|