EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Microchip PIC as USB host?

Started by Steve Brower March 8, 2005
I have a project to do with an embedded processor where i would like to 
hang a "thumb drive" on the USB port of one of Microchip's PIC  devices. 
The idea is that the thumb drive is used for data storage which a user 
can remove from my product, plug into his desktop/laptop, and retrieve 
the data.

The PIC device embedded in my product would need to be a host for the 
thumb drive.

I see some pretty good info on Microchip's web site about using their 
parts as USB peripherals, but nothing about use as a host. Are the PIC 
parts up to the job? Has anyone ever used a PIC device as a USB host? 
Fortunately, it wouldn't need to be a full-featured host. Only enough to 
handle the thumb drive. What do you folks think? Is it feasible?
Steve Brower <slbrower@att.net> wrote:
> I have a project to do with an embedded processor where i would like to > hang a "thumb drive" on the USB port of one of Microchip's PIC devices. > The idea is that the thumb drive is used for data storage which a user > can remove from my product, plug into his desktop/laptop, and retrieve > the data. > > The PIC device embedded in my product would need to be a host for the > thumb drive. > > I see some pretty good info on Microchip's web site about using their > parts as USB peripherals, but nothing about use as a host. Are the PIC > parts up to the job? Has anyone ever used a PIC device as a USB host? > Fortunately, it wouldn't need to be a full-featured host. Only enough to > handle the thumb drive. What do you folks think? Is it feasible?
I dunno about Microchip, but I do know that Atmel and Cypress might have parts more suited to what you need. Thumb drives are considered Mass Storage Devices, so you host needs to support at least that. Since you are only interested in using USB as a form of storage, why not use MMC, Compact Flash or SD? IMHO they are much more easy to interface than USB -- Wing Wong. Webpage: http://wing.ucc.asn.au

Steve Brower wrote:

> I have a project to do with an embedded processor where i would like to > hang a "thumb drive" on the USB port of one of Microchip's PIC devices. > The idea is that the thumb drive is used for data storage which a user > can remove from my product, plug into his desktop/laptop, and retrieve > the data. > > The PIC device embedded in my product would need to be a host for the > thumb drive. > > I see some pretty good info on Microchip's web site about using their > parts as USB peripherals, but nothing about use as a host. Are the PIC > parts up to the job? Has anyone ever used a PIC device as a USB host? > Fortunately, it wouldn't need to be a full-featured host. Only enough to > handle the thumb drive. What do you folks think? Is it feasible?
Being the host requires more CPU Power. The peripheral do no require as much. Memory cards are much simpler. They have an SPI interface. Look at this months Circuit Cellar INK.

"Steve Brower" <slbrower@att.net> skrev i meddelandet
news:gjtXd.351728$w62.255243@bgtnsc05-news.ops.worldnet.att.net...
> I have a project to do with an embedded processor where i would like to > hang a "thumb drive" on the USB port of one of Microchip's PIC devices. > The idea is that the thumb drive is used for data storage which a user > can remove from my product, plug into his desktop/laptop, and retrieve > the data. > > The PIC device embedded in my product would need to be a host for the > thumb drive. > > I see some pretty good info on Microchip's web site about using their > parts as USB peripherals, but nothing about use as a host. Are the PIC > parts up to the job? Has anyone ever used a PIC device as a USB host? > Fortunately, it wouldn't need to be a full-featured host. Only enough to > handle the thumb drive. What do you folks think? Is it feasible?
It you use the AT43USB380 chip then the USB host stack runs on the chip and the USB Mass Storage Adapter runs on the CPU. If this is an AVR you need around 64 kB Flash for the USB stuff and 4 kB SRAM. With the difference in Code generation using a PIC, I think you may need more than 128 kB of flash, so I am not sure that this is workable. Another thing is that Atmel delivers the Mass Storage as object code so you have to use a supported architecture. These include AVR and ARM, think that PowerPC, Coldfire is also supported, but you should send a mail to "usb ath atmel doht com" for info on this. There is a standard for USB memory stick, but noone uses the plain standard, so you need to qual your solution for every major memory stick out there. -- Best Regards Ulf at atmel dot com These comments are intended to be my own opinion and they may, or may not be shared by my employer, Atmel Sweden.

The 2024 Embedded Online Conference