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

ex_usb_serial example help!!!!

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



Joined: 04 Feb 2006
Posts: 1

View user's profile Send private message

ex_usb_serial example help!!!!
PostPosted: Thu Mar 02, 2006 12:24 pm     Reply with quote

I try to build the ex_usb_serial example but it not works at all...

Lets say:

COM1: virtual com port created by the drivers (USB)
COM2: physical com port

In the COM1 --> COM2 direction everything works great
at COM2 --> COM1 direction nothing happens...

someone had the same problem???
Solutions??

Tanks in advance...
palermo
Guest







PostPosted: Sat Jul 01, 2006 5:04 pm     Reply with quote

I had the same problem, i just changed

#use rs232(baud=19200, xmit=PIN_C6, rcv=PIN_C7)

to

#use rs232(baud=19200, xmit=PIN_C7, rcv=PIN_C6)

And now it worked.

Does anyone no the reason?

Thanks,
Bruno
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Jul 01, 2006 10:55 pm     Reply with quote

What you've done by switching the pins is to make a software UART.

A software UART can't lock up if the receiver is overrun, but the
hardware UART can.

You can test if this is the problem by putting the pins back to the
hardware UART configuration, and then adding the ERRORS parameter
to the #use rs232() statement. This will clear any overrun errors
that occur, and prevent the hardware UART from locking up.

Example:
Quote:
use rs232(baud=19200, xmit=PIN_C6, rcv=PIN_C7, ERRORS)

Make sure you do it exactly as shown above, with C6 for xmit and
C7 for rcv.

I don't know if this will fix the problem, but it might.
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