Click here to Skip to main content
15,939,799 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
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?
Updated 26-Apr-13 11:31am

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[^]).
Share this answer
khaledkee 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 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?
khaledkee 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 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:

khaledkee 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
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?
Share this answer

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900