Its possible to conect 18f4550 to usb device?


Closed Thread
Results 1 to 22 of 22
  1. #1

    Default Its possible to conect 18f4550 to usb device?

    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.

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947

    Default

    No. Pic USB is slave. You need a USB master to do this.

  3. #3

    Default

    Hi,

    What is the usb master? where can i find info.

    Thanks

  4. #4
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by camolas View Post
    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

  5. #5

    Default

    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

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795

    Default

    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/id...cName=en531078

    Ioannis

  7. #7

    Default

    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
    Last edited by camolas; - 18th May 2008 at 01:58. Reason: more things to say

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    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
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9

    Default

    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
    Last edited by camolas; - 19th May 2008 at 23:48. Reason: more things to say

  10. #10

    Default

    What the experts think about this soluction for my problem? http://apple.clickandbuild.com/cnb/s...duct_info-null

    Its easy to macke the code?

    Thanks

  11. #11
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    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/downlo...z%20Manual.pdf
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  12. #12
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    Quote Originally Posted by camolas View Post
    What the experts think about this soluction for my problem? http://apple.clickandbuild.com/cnb/s...duct_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...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  13. #13

    Default

    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

  14. #14
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    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.
    Last edited by mister_e; - 20th May 2008 at 01:54.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  15. #15
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by mister_e View Post
    I could help, but it's not going to be free...
    Me too! Me too!

  16. #16

    Default

    Quote Originally Posted by skimask View Post
    Me too! Me too!
    Im not a rich men ok

  17. #17

    Default

    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

  18. #18
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

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

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  19. #19

    Default

    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

  20. #20

    Default

    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/show...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/da...s/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



    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
    Last edited by camolas; - 30th May 2008 at 12:18. Reason: correcting code

  21. #21
    skimask's Avatar
    skimask Guest

    Default

    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?

  22. #22

    Default

    Quote Originally Posted by skimask View Post
    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

Similar Threads

  1. USB Bootloader.
    By HenrikOlsson in forum USB
    Replies: 22
    Last Post: - 2nd May 2013, 03:46
  2. USB Device Not Recognized ???
    By keymuu in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 8th October 2008, 01:53
  3. 18f4550 Device not recognized
    By garethconner in forum USB
    Replies: 3
    Last Post: - 22nd December 2007, 04:00
  4. How can I turn off USB support in 18F4550
    By BrianT in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 6th September 2007, 04:56
  5. usb - device not recognised
    By mpardinho in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th January 2007, 18:47

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts