Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Microcontroller USB Driver , +
Hello Everybody,I'm an intermediate programer in Desktop programing using C#,C,C++ and java and I started a new project with microcontroller PIC18f2550.
I Programed the device driver for windows and linux but I can't start programing the microcontroller as it should send the USB descriptor. The problem is not in the descriptor itself but in how to send it I have to connect the device with two way USB although there is only one USB interface in that micro and anyother Microchip(PIC) microcontrollers. I connected one jack with the USB ports interface pins (RC5/D+)(RC4/D-) and the another one with the serial ports interface pins(RC7/RX)(RC6/TX).
Now my question is: How to send that descriptor through the USB interface pins and the serial ports ones?
Posted 26-Apr-13 12:17pm
Edited 26-Apr-13 12:31pm
v4
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You cannot wire a Serial port to a USB port, they are different line levels and protocols, this has nothing to do with the descriptors and setting up the USB and everything to do with how data is transmitted at the circuit level. If you want to connect a USB port to a serial port, you will need a go-between chip like the FTDI (Here[^]).
  Permalink  
Comments
khaledkaaka at 26-Apr-13 22:50pm
   
I cann't add this because I need high speed USB 480 Mbps not full speed 12 Mbps. Also RC7,6 can be used as normal input/output pins please help! the only problem is in sending the descriptors. Any solution.
Ron Beyer at 26-Apr-13 23:50pm
   
A PIC will never do 480 Mbps, USB, Serial, or otherwise. Even on PIC's website the max speed of the USB interface is 12 Mbps and that speed would probably be difficult to achieve. For 480 Mbps you will need to get into FPGA territory (not for novices, very advanced stuff) Are you using some kind of development board or are you trying to wire directly to the chip? Do you have a schematic you can share for what you have and are trying to do?
khaledkaaka at 27-Apr-13 0:08am
   
I'm using a PCB board and I need to make a device with two way USB ok I'll not be worry about the speed but how can I send the descriptor in non-USB interface pins that is only my question or how it be sent in the USB pins to semulate that.
Ron Beyer at 27-Apr-13 0:27am
   
I'm sorry, but you can't connect non-usb pins to a usb port. You cannot directly (without the FTDI or similar chip) connect Serial to USB, its just not possible. There's nothing you could send on a serial port to talk to a USB port, or vice-versa and you may damage the chip (or worse, your computer) attempting to directly connect the two. I may be misunderstanding what you are trying to do here, but you can (or should be able to at least) program the PIC through the serial port using MPLAB and set up the chip to do USB communications through the code on the PIC. PIC has reference software to do this available: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en537044
 
khaledkaaka at 27-Apr-13 1:05am
   
Can I connect any GPIO to the usb data wires and send data from it? I'm already using MPLAB
Ron Beyer at 27-Apr-13 1:19am
   
No, the USB lines work on a transceiver that is internal to the PIC, that's why it only has one USB port, because it only has one transceiver. It's not just sending data down the line, it does a lot more like line level conversions, bus negotiation, etc. If it were serial I would say yes, since you can bit-bang serial, but you can't bit-bang USB.
khaledkaaka at 27-Apr-13 1:29am
   
In flow code you can program a non-USB interfaced micro like pic12f675 to send and receive USB data packets and it doesn't have any USB transceiver. Can I send the data using USB data packet format.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

instead of using serial pins I found the solution and it worked. I used two micros and each one interacts with a computer but now move to the speed problem I'll use a FPGA but I wanna know does it have 2 USB-IF or only one?
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 400
1 Jochen Arndt 190
2 Richard MacCutchan 135
3 DamithSL 95
4 Garth J Lancaster 90
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,032
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,220


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 29 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100