From: Uzumaki on
Hi guys,

I know that recent versions of Real-Time Windows Target (RTWT) support the RS232 communication better than previous versions. But I need to know more about how well RTWT can support RS232. For example, I have some questions as follow:

1. If I have a RS232 port which is set to run at baudrate 115200 (or even higher), can RTWT handle this?
2. What is the minimum possible sample time RTWT can achieve when working with a RS232 port?
3. Why doesn't RTWT support a virtual RS232 port (the one created by using a USB-to-RS232 cable)?
3. Is there any advice about using RTWT with RS232 communication?

Thank you for reading my question. Any answer would be very appreciated.

Regards,

Uzumaki
From: Walter Roberson on
Uzumaki wrote:

> 3. Why doesn't RTWT support a virtual RS232 port (the one created by
> using a USB-to-RS232 cable)?

My understanding, based upon briefly looking at some previous messages
(and not based upon practical experience) is that USB to RS232 cables
can not or do not provide a tight enough interrupt latency.

I was just looking at the source for a USB to serial driver, which seems
to indicate that it returned characters after 40 ms or after 62 bytes
have been read (whichever comes first), _unless_ the device is
effectively "polled" by sending it a Special Event request.

Every communication from a USB device is a packet; to receive a single
character requires transfer of at least a 5 byte header; at least one
mass-produced converter also requires reserves the first two bytes of
data for the modem and line status registers. Such devices thus require
the transfer of at least 8 bytes in order to transfer a single
"real-time" byte -- and that is in addition to the time the device
spends negotiating for control of the USB bus and negotiating bus speed.