View previous topic :: View next topic |
Author |
Message |
Olma
Joined: 16 Feb 2009 Posts: 2
|
PIC18F2553 USB<->RS232 problems |
Posted: Mon Feb 16, 2009 8:42 am |
|
|
Hello
I work with an PIC18F2553@20MHz and try to use the USB as an "virtual com port" (cdc).
I used the sample Code from ex_usb_serial.c. I changed only the 18F4550.h include to the 18F2553.h.
I managed that my PC (Windows Xp) recognize the device and I install the driver that is provided by CCS (cdc_NTXP.inf).
I also managed to send a few chars over the "virtual com port" to the uC and send them back over the RS232, but after a few chars(2-5) my monitoring programm crashs and I have to reset the uC and the monitoring programm (I tried SIOW and Hyperterminal).
The second problem is, the uC won't send any chars over the USB and/or the monitoring programm can't display it.
Have anybody an idea what could be wrong?
Regards Olma
Edit: Other Usb examples like ex_usb_kbmouse.c worked. |
|
|
nuwavedc
Joined: 06 Feb 2008 Posts: 17
|
|
Posted: Tue Feb 17, 2009 6:31 pm |
|
|
Hello olma,
we have been battling with the USB cdc on the 18F4550 for a long time. I'm beginning to think a rewrite would have been wise some time back.
We are using a virtual comm port too and are experiencing similar problems where the USB will lose connection and will require it to be unplugged and plugged back in.
Another issue is windows XP's recognition of the USB part. It sometimes just comes up with garbage characters under the new hardware found dialog. _________________ Thanks,
NuWaveDC |
|
|
Olma
Joined: 16 Feb 2009 Posts: 2
|
solved |
Posted: Mon Feb 23, 2009 7:09 am |
|
|
I solved the problem.
the problem was, that i used a 220pF capacitor on the Vusb.
I replaced it with an 220nF and now it works.
Regards Olma |
|
|
Ttelmah Guest
|
|
Posted: Mon Feb 23, 2009 8:40 am |
|
|
Even 220nF, is a little small, but probably OK.
Microchip _recommends_ 470nF. 220nF, is given as the _minimum_ acceptable in the data sheet.
Best Wishes |
|
|
|