View previous topic :: View next topic |
Author |
Message |
ffatih18
Joined: 19 Mar 2007 Posts: 4 Location: Turkey
|
readin from usb flash memory stick |
Posted: Sat Apr 28, 2007 6:54 am |
|
|
i want to read usb memory stick but i couldn't find any information about the memory sticks. did anyone try to read or write to a memory stick? so can you give me any idea about memory sticks .
Thanks... _________________ in the name of ALLAH |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Sat Apr 28, 2007 7:17 am |
|
|
Reading a USB flash drive requires the PIC implement a USB Host controller. Currently this capability is not available in a PIC. You can integrate a USB Host controller from Maxim.
A much easier alternative is to implement an SD/MMC card interface on a PIC. An standard SPI bus is used to communicate between the PIC and the card. Reference schematics for interfacing SD/MMC cards are here: http://www.brushelectronics.com/index.php?page=projects
A USB to SD/MMC reader for the PC are readily available and cost $10 to $20 _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
Ttelmah Guest
|
|
Posted: Sat Apr 28, 2007 7:20 am |
|
|
There are two parts to this:
The data format on the stick is exactly the same as on any other storage device like this. A file system (typically FAT16, or FAT32). This involves exactly the same code, as MMC/SD etc..
The second part though is the physical interface. PIC's, are USB _slave_ devices. To talk to a stick, requires a USB _master_ (host) device. Hence you cannot simply connect such a device to a PIC.
This is why this is not a common setup.
A couple of solutions exist:
The FTDI Vinculum, and similar USB chips. The VDIP1 demo module, allows memories like this, to be directly accessed using the UART, or the SPI interface.
Seperately, some companies offer similar modules, for robotic applications, giving a simpler interface to the USB device.
Best Wishes |
|
|
mskala
Joined: 06 Mar 2007 Posts: 100 Location: Massachusetts, USA
|
|
Posted: Sat Apr 28, 2007 7:45 am |
|
|
Yes, modules are available. I've successfully used the uALFAT-USB from GHI electronics.
You can use I2C, SPI, or UART as interface to it.
Mark S |
|
|
ffatih18
Joined: 19 Mar 2007 Posts: 4 Location: Turkey
|
readin from usb flash memory stick |
Posted: Sat Apr 28, 2007 8:17 am |
|
|
Ok.i have ft232bl so i want to use ft232bl of ftdi. it uses for converting pic usart to usb.is that possible? _________________ in the name of ALLAH |
|
|
Ttelmah Guest
|
|
Posted: Sat Apr 28, 2007 8:55 am |
|
|
Yes, just connect it's logic signals to the PIC's UART lines.
You don't even need this though, chips like the PIC 18F2550, have the USB slave hardware incorportated, and can do this, while leaving their own UART available for other jobs. The FTDI solution in this case is very easy (no code involved), but lowest part count solution is to use a PIC with the ability already present.
Best Wishes |
|
|
ffatih18
Joined: 19 Mar 2007 Posts: 4 Location: Turkey
|
|
Posted: Mon Apr 30, 2007 2:37 am |
|
|
ok. thanks for your helps. _________________ in the name of ALLAH |
|
|
ffatih18
Joined: 19 Mar 2007 Posts: 4 Location: Turkey
|
|
Posted: Wed May 02, 2007 1:23 am |
|
|
what is the protocol of usb stick memory.what is the respond of usb memory stick for my question?what must i do? _________________ in the name of ALLAH |
|
|
|