View Full Version : Its possible to conect 18f4550 to usb device?
camolas
- 17th May 2008, 16:25
Hi,
Can i conect a usb device like bt or gps antena direct to the pic usb ports?
If its were can i find a sample code?
Thanks all.
Jerson
- 17th May 2008, 16:26
No. Pic USB is slave. You need a USB master to do this.
camolas
- 17th May 2008, 16:30
Hi,
What is the usb master? where can i find info.
Thanks
skimask
- 17th May 2008, 16:41
What is the usb master? where can i find info.
http://en.wikipedia.org/wiki/USB
http://en.wikipedia.org/wiki/USB_On-The-Go
camolas
- 17th May 2008, 17:04
Hi,
Ive a very big problem in me head im traying to conect my nokia 6230 to the pic (i have made some difrent cables that i saw in the net but non of them sims to work whit the pic or pc) i have a original nokia usb cable and works very well in the pc conecction but i need to coneccted to the pic, sow the idea was to try with a pic usb.
I read the info on the links that you post but can solve me problem im going crazy... :(
Can any one heelp me please?
Thanks
Ioannis
- 17th May 2008, 20:05
Jerson replied to you and the answer was straight no. Now, how on earth will you coannect a slave (your Nokia) to another slave (your PIC)? It can not be done, at least with this PIC. Have a look at the Microchip site. Recently new PIC's with hosting capabilities have appeared.
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1335&dDocName=en531078
Ioannis
camolas
- 18th May 2008, 00:40
Hi,
I now sory about this but i was only complain of my self and try if any one was cain to help a noob on this matters :(
The new pic is a very good soluction to my problem but i do not have the programer for this kind of pic and the now how to mack this kind of code.
By by
mister_e
- 19th May 2008, 17:01
You could probably interface your mobile and a PIC with a chip solution in between such as USBwiz.
http://www.ghielectronics.com/details.php?id=5
If you look at the Download list, you'll find a note on Nokia AT commands
camolas
- 19th May 2008, 22:44
Hi,
Thanks for caring about, i have see the ftdi chip to but im very new at all this and i do not now how to program this chips (because they sell it clean) and with what programer?
This USBwiz is a plug in and play good soluction but how do i conect it to the pic? i dont now how this work.Can you please explain me?
But it must be expensive :(
Thanks
camolas
- 19th May 2008, 23:55
What the experts think about this soluction for my problem? http://apple.clickandbuild.com/cnb/shop/ftdichip?productID=79&search=VDIP2&op=catalogue-product_info-null
Its easy to macke the code?
Thanks
mister_e
- 19th May 2008, 23:57
USBWiz can be use in SPI/I2C and with simple USART communication. Look at their FAQ
http://www.ghielectronics.com/faq.php?id=5
Pricing is fair enough ~20USD
You'll need to play a little bit with it... and read the whole set of PDF on their website... even if they're a bit badly explained (my personal opinion... i saw way better before... but worst as well) . The user manual is only 53 pages long.
http://www.ghielectronics.com/download/USBwiz/USBwiz%20Manual.pdf
mister_e
- 20th May 2008, 00:15
What the experts think about this soluction for my problem? http://apple.clickandbuild.com/cnb/shop/ftdichip?productID=79&search=VDIP2&op=catalogue-product_info-null
Its easy to macke the code?
Thanks
VDIP2 or VDIP1 could probably be used for that. I don't know how easy/hard/doable this will be with Nokia phone though...
camolas
- 20th May 2008, 00:32
Ok if you say its because it is :) sow what is the exact device from them that i have to buy? (i want 2 usb conections)
Can you leter hellp me on the code and other staff?
Thanks
p.s. ypu are Cristiano Ronaldo from pics ;)
mister_e
- 20th May 2008, 00:51
I tend to believe that USBWiz would be the right choice. I'll suggest you to contact them directly just to make sure it can handle 2 USB devices (as they seems to say on their website)
Vinculum (VDIP2) may work too, good part... it's a plug & play module, nothing to solder, already assembled... Even here, i would suggest you to contact them to make sure it can talk with the devices you have on hand.
I could help, but it's not going to be free... Seems i still have some e-mail problems, so PM me if you're interested.
skimask
- 20th May 2008, 03:35
I could help, but it's not going to be free...
Me too! Me too!
camolas
- 20th May 2008, 11:59
Me too! Me too!
Im not a rich men ok
camolas
- 28th May 2008, 13:44
Im waiting for the ftdi part, later i will get in touch about that for now can i wired in apic to pic serial connection de Tx (from pic transmiter) to de Rx (from pic receiver) direct or ned to put some resistor?
Thanks
mister_e
- 28th May 2008, 14:22
No real need for resistor for a PIC to PIC connection.
If you have any MAX232, MAX233, you could also try a PIC to PC connection. Not easier, but probably better for a first experimentation.
camolas
- 28th May 2008, 15:38
Hi Mister,
I have done the pic/pc conection alredy and works fine ;) now im going to try pic/pic.
Thanks for the help
By by
camolas
- 30th May 2008, 01:35
Hi,
Today i get the VDIP2, im reading a lot about this part and how to use it with a pic http://www.picbasic.co.uk/forum/showthread.php?t=7700&highlight=vdip like to thank especially to BrianT for is great job my code is based on is.
Here is the data from VDIP2 http://www.vinculum.com/documents/datasheets/DS_VDIP2.pdf
Im very new at all this and i have a lot of concerns on doing this (the part is not very cheap 32€ :( im afraid to kill her) as i read from BrianT e have to reflash it and i do not now if i need to do the same a not clear how to and what firmware to put.
Ftdi do not suport very well me...
I to do not now if i need to put some resistors in the pic vdip2 connections?
My 1st idea was and is to connect a pic to a nokia 6230 with is original usb data cable and sending sms and macking calls..
Here my traing code
DEFINE LOADER_USED 1
define OSC 20
Include "modedefs.bas" ' Include serial mode
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
DEFINE HSER_SPBRG 129 ' 9600 Baud @ 20MHz, 0.16%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
'bits 2 & 3 temporarily inputs
TrisC.2=0 'active LOW reset line to VDIP2
TrisC.3=1 'Cts# Flow control to VDIP2
TrisC.4=1 'Rts# Flow controlto from VDIP2
TrisC.5=0 'Led to see if pic and code is ok blink 3 times
TrisC.6=0 'Rx VDIP2
TrisC.7=1 'Tx VDIP2
B0 var byte
High portb.5
Pause 500
Low portb.5
Pause 500
High portb.5
Pause 500
Low portb.5
Pause 500
Start:
High PortC.2 'active LOW so not reset
Low PortC.3 'pull VDIP2 pin CTS low
Input PortC.2 'from VDIP2 pin RTS
High PortC.6 'condition serout pin to mark state
Pause 5
HSEROUT ["AT", 13]
HSEROUT ["ATD=+351xxxxx000;", 13]
STOP
end
Please comment anf if some one can hellp me...
Thanks for all and sory for this long letters and less good work post.
By by
skimask
- 30th May 2008, 02:01
I've got a small question...
What good is a 10us delay between 2 9600 baud HSEROUT statements, when, at 9600 baud, a bit takes 104.1us?
camolas
- 30th May 2008, 11:17
I've got a small question...
What good is a 10us delay between 2 9600 baud HSEROUT statements, when, at 9600 baud, a bit takes 104.1us?
Just like i said i just try to adapt the BrianT code for my needs and i do not have many experience with coding pics sow i will erasit now.
My bigests concerns at moment are if i need to reflash de VDIP2 and how and with what firm. if there is a need of puting some resistor... in pic-vdip2 connections and then the code..
Thanks for caring and i be grateful if you can hellp.
Bt by
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.