CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC18F2553 USB<->RS232 problems

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Olma



Joined: 16 Feb 2009
Posts: 2

View user's profile Send private message

PIC18F2553 USB<->RS232 problems
PostPosted: Mon Feb 16, 2009 8:42 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Feb 17, 2009 6:31 pm     Reply with quote

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

View user's profile Send private message

solved
PostPosted: Mon Feb 23, 2009 7:09 am     Reply with quote

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







PostPosted: Mon Feb 23, 2009 8:40 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group