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 CCS Technical Support

readin from usb flash memory stick

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



Joined: 19 Mar 2007
Posts: 4
Location: Turkey

View user's profile Send private message Send e-mail MSN Messenger

readin from usb flash memory stick
PostPosted: Sat Apr 28, 2007 6:54 am     Reply with quote

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: 1636
Location: Perth, Australia

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

PostPosted: Sat Apr 28, 2007 7:17 am     Reply with quote

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







PostPosted: Sat Apr 28, 2007 7:20 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Apr 28, 2007 7:45 am     Reply with quote

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

View user's profile Send private message Send e-mail MSN Messenger

readin from usb flash memory stick
PostPosted: Sat Apr 28, 2007 8:17 am     Reply with quote

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







PostPosted: Sat Apr 28, 2007 8:55 am     Reply with quote

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

View user's profile Send private message Send e-mail MSN Messenger

PostPosted: Mon Apr 30, 2007 2:37 am     Reply with quote

ok. thanks for your helps.
_________________
in the name of ALLAH
ffatih18



Joined: 19 Mar 2007
Posts: 4
Location: Turkey

View user's profile Send private message Send e-mail MSN Messenger

PostPosted: Wed May 02, 2007 1:23 am     Reply with quote

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
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