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 support@ccsinfo.com

Using RTS\CTS with the USB CDC Virtual Com Port

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



Joined: 28 Aug 2008
Posts: 2

View user's profile Send private message

Using RTS\CTS with the USB CDC Virtual Com Port
PostPosted: Wed Apr 21, 2010 2:21 pm     Reply with quote

I have an application where I need to use RTS (Request To Send) to control serial communications half duplex direction. When RTS is active - transmit, and when RTS is inactive - receive.

Is there a way to read the state of RTS, as well as other control lines, using the CCS USB libraries?

Thanks!
Ttelmah



Joined: 11 Mar 2010
Posts: 19326

View user's profile Send private message

PostPosted: Thu Apr 22, 2010 3:18 pm     Reply with quote

Do you really need to?.
The easiest way, is to have you PIC UART code, setup to look at the required status lines, and if the device to which you are talking goes 'busy', signal that DCD has gone inactive back to the PC.
Going the other way (PC receiving), there is normally no need to control, unless the USB bus has got overloaded, and cannot accept the data. In which case, you just disable CTS, and there is no point in trying to send status information back to the PC, till the USB bus recovers...

Best Wishes
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Fri Apr 23, 2010 2:00 am     Reply with quote

According to the CDC spec, the set_control_line_state request is used to to transmit RTS. It's decoded in the
CCS CDC driver to the structure usb_cdc_carrier, check the sources.
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