PDA

View Full Version : Reading a slave USB with a pic



pcaccia
- 23rd October 2008, 18:15
Hi all
I don't know the USB protocol...but I think the USB can communicate with a host..and a slave. The host normally is a PC ...the slave may be a USB pen..or a weather station...or...an HD.
Do you think may be possible to handle the USB data output from a slave device with a pic (18f4550...in this way the pic work as a host device)? ....or the PIC can only work as slave device?
May be a stupid question..but I need to read data outputted from a USB PIC (18f2550) with another pic to handle them without a computer.

Paolo

skimask
- 23rd October 2008, 18:25
Do you think may be possible to handle the USB data output from a slave device with a pic (18f4550...in this way the pic work as a host device)? ....or the PIC can only work as slave device?
PIC's (as you probably know them, 18Fxx50 types) are slaves only.


May be a stupid question..but I need to read data outputted from a USB PIC (18f2550) with another pic to handle them without a computer.
Then don't use USB. Use serial, parallel, whatever. Don't have to use (well, can't use) the USB ports to transfer between 2 PIC's.

pcaccia
- 23rd October 2008, 18:36
Thanks Skymask for you fast reply !
I can't choose the communications between PICS...(I like to much the serial communications)
"SIMPLY" ...I must read data from a USB without a computer!
An example maybe ...I must read the data outputted form an USB weather station....and reading the data I must speack all values with a sythesis voice..
Bahhh ..think me crazy!

Paolo

rmteo
- 23rd October 2008, 18:45
There are PIC's that support slave, host as well OTG. However, skimask is correct that you have to look at something other than USB as PBP does not support those PIC's.

dhouston
- 23rd October 2008, 18:54
I've never looked at it in depth but FTDI has a USB host controller called Viniculum which has UART, SPI & parallel interfaces. It may give you a way to do what you want.http://www.vinculum.com/prd_vnc1l.htmlThey have some sample applications interfacing PICs to USB slave devices. Unfortunately they are in C but they do show that what you want to do is possible with their chip. The chip is about $10 or for about $20 you can get an eval board.http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&prodCategoryID=57&title=VDIP1

pcaccia
- 24th October 2008, 17:06
This is what I'm looking for!

Thanks all

Paolo

dhouston
- 24th October 2008, 18:11
Let us know how it works out - along with your PBP code.

pcaccia
- 25th October 2008, 12:00
Order executed!
Sure I will report all in this same post!

Paolo