Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

how can i add a usb flash memory to 18f4550

Status
Not open for further replies.
I heared about hosts... is that its function??

I thought that it enables the connection with camera to make the capture order??

so it enables transfering data from the memory of the camera that is usb accessed...???
 
A USB device is a item you plug into your PC
A USB host is either a PC or Other Device you plug your USB devices to.

Flash memory alone is different. But USB Flash Stick is a Device and you cannot (with usb) have 2 devices communicate with each other.
 
Use Compact Flash or SD a lot easier to do . using a pic as a host would take most all of it's flash. You have to bit bang it your self . They say AVR can run as a host
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.
 
hi every body

is it easy to connect a flash memory to 18f4550 and get data from it ..??

It is not. First, you will need USB Host controller. I have a PIC18 code for MAX3421E USB host controller, you can look at my site to see what it looks like. Second, you'll need to write a code for Mass Storage Layer, SCSI, FAT, and finally your application. You can look at Microchip USB Stack to see what all these layers look like. Last, the thing is going to be slow. SD card connected to the same SPI port will work 10 times faster.
 
If you really want the flash drive, rather than a SD card, you can look at the FTDI Vinculum chip. In comes in a DIP eval module and provides a pretty seamless access to a USB flash drive. It even supports the file system.

I haven't used it myself, but researching it, it looks pretty good.

$24 for the evaluation DIP module from Digikey. $11 for the chip itself.
 
okay .. now my application is become more clear,

I have to take photos from a USB digital camera to the micro controller (pic)..

so I thought that I have to deal with it as a normal flash memory,isn't it?
 
You need a USB host to communicate with a digital camera.

What is the PIC supposed to do with the data?[/QUOTE

okay, now the host is for enabling communication with camera (capture,transfer data,accessing modes,...) or for dealing with it as a normal USB enabled memory???

also I have another wonder, I have informed that pic 18f4550 can support USB so the question is why it does not deal with USB devices directly without the need of host :confused:
 
You need a USB host to communicate with a digital camera.

What is the PIC supposed to do with the data?[/QUOTE

okay, now the host is for enabling communication with camera (capture,transfer data,accessing modes,...) or for dealing with it as a normal USB enabled memory???

also I have another wonder, I have informed that pic 18f4550 can support USB so the question is why it does not deal with USB devices directly without the need of host :confused:

Because it's a USB slave, NOT a host - you can't plug two flash drives together and copy from one to another, because BOTH are slaves. The USB on a PIC is a slave as well, for connecting to a PC.

As Bill says, what are you hoping to do with the data in a PIC anyway?, you don't have enough memory space to do much.
 
Because it's a USB slave, NOT a host - you can't plug two flash drives together and copy from one to another, because BOTH are slaves. The USB on a PIC is a slave as well, for connecting to a PC.

As Bill says, what are you hoping to do with the data in a PIC anyway?, you don't have enough memory space to do much.

I just want to take photos from digital camera to the PIC then transfer this photo to a GPRS module in order to be send to a web page.

thats it!
 
I just want to take photos from digital camera to the PIC then transfer this photo to a GPRS module in order to be send to a web page.

PIC's don't have enough memory space to hold a digital photo, although it may be possible to buffer enough of it to send it in small pieces.

But why USB?, just take the memory card out of the camera, and read that directly, which is pretty simple (compared with USB).
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top