Search code examples
embeddedusbemulationuart

Emulating UART over USB


Does anybody know if it's possible to emulate UART (simple serial transmit and receive) over USB? How would this be accomplished?

I found this link on the Microchip website, but it's not very forthcoming.

http://www.microchip.com/forums/m522571-print.aspx

Any ideas? Thanks.


Solution

  • Basically you have two options to emulate UART over USB:

    1. Use an existing product. The company FTDI provides well known and solid UART-USB bridge chips, e.g. FT230X. Pro: You don't need any detailed knowledge about USB. Cons: Expensive if used in mass production. Additional hardware, needs additional power.

    2. Implement the USB device class "Communication Device Class" (CDC). The specification of CDC is available from the USB.org, see here. Pro: Cheap in mass production (if your Microcontroller has USB on board). Con: You need detailed knowledge about USB.