View previous topic :: View next topic |
Author |
Message |
kcessac
Joined: 28 Aug 2008 Posts: 2
|
Using RTS\CTS with the USB CDC Virtual Com Port |
Posted: Wed Apr 21, 2010 2:21 pm |
|
|
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! |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19358
|
|
Posted: Thu Apr 22, 2010 3:18 pm |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Fri Apr 23, 2010 2:00 am |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
|