??? 04/06/07 09:18 Read: times |
#136727 - Virtual COM port vs Direct port Responding to: ???'s previous message |
Virtual COM port emulates legacy COM port on PC. A device driver on PC shows USB ports as usual COM port. For Windows, it means that the port is accessed using these Win-API.
"Communications Functions" from MSDN http://msdn2.microsoft.com/en-us/lib...63194.aspx And USB CDC spec just defines how to carry RS232 signaling over USB. This table shows the relation between Win-API, RS232 signaling, USB CDC spec and UART on the chip. Win APIs RS232 USB UART SetCommState() - Setting parameters - Endpoint 0 - command register EscapeCommFunction() (baud, data bits..) status register SetCommBreak() DTR, RTS ClearCommBreak() GetCommState() - DSR, DCD, RI - interrupt IN EP - status register ClearCommError() Break status GetCommModemStatus() Parity error Frame error Overrun error WriteFile() - TX - bulk OUT EP - UART TX ReadFile() - RX - bulk IN EP - UART RX Host application <--> Device driver <-----> USB hardware <--> Firmware You may be aware of it, USB CDC spec doesn't support CTS. There is no reason that we have to always apply USB CDC spec to carry RS232 signaling. We can define the method to carry it over USB freely. It is called as direct port. In this case, another device driver is required. For example, the direct port is realized using a generic bulk device driver, such as usb_bulk example from Win DDK (downloaded free from MS). "DDK - Windows Driver Development Kit" http://www.microsoft.com/whdc/DevT...fault.mspx Direct port example Win APIs RS232 USB UART WriteFile() - Setting parameters - bulk OUT EP1 - command register ReadFile() Handshake bulk IN EP1 status register Error status WriteFile() - TX - bulk OUT EP2 - UART TX ReadFile() - RX - bulk IN EP2 - UART RX Direct port is shown to application as USB ports. When we apply direct port, the signals of multiple UARTs are assigned to it easily. Win APIs RS232 USB UARTs (multiplexed on UARTs) WriteFile() - Setting parameters - bulk OUT EP1 - command registers ReadFile() Handshake bulk IN EP1 status registers Error status WriteFile() - TX - bulk OUT EP2 - UART1 TX ReadFile() - RX - bulk IN EP2 - UART1 RX WriteFile() - TX - bulk OUT EP3 - UART2 TX ReadFile() - RX - bulk IN EP3 - UART2 RX ... Tsuneo |
Topic | Author | Date |
Multiple USB Virtual COM Ports | 01/01/70 00:00 | |
CDC composite device | 01/01/70 00:00 | |
So much for my idea | 01/01/70 00:00 | |
Union function descriptor | 01/01/70 00:00 | |
driver development | 01/01/70 00:00 | |
Composite device, again | 01/01/70 00:00 | |
Virtual COM port vs Direct port | 01/01/70 00:00 | |
what about real (non-virtual) | 01/01/70 00:00 | |
And there are lots of serial-to-IP "adapters" | 01/01/70 00:00 |