I have an example of the cdc class implementation from texas but it was done on the IAR environment and I am having difficulty in porting it to the KEIL environment. Does someone maybe have an example of the usb cdc implementation on this micro for the KEIL environment. Or otherwise is there a general example of the cdc class implementation for the 8051 somewhere?
If you need just USB connection over a virtual COM port, I recommend you USB-UART chips like FTDI's.
a) It makes your development easy b) The custom device driver of FTDI is more reliable than Windows in-box device driver for CDC (usbser.sys), for noise and connection recovery. c) FTDI supports handshake lines fully, especially RTS and CTS.
As of the user experience of installation, you have to provide a custom INF file for usbser.sys. Installation is still required for the INF file, even for this in-box device driver. Then, the in-box device driver has no advantage on the installation. Rather, the certified driver of FTDI makes the installation simple.
When the cost of a USB MCU, including the development, is less than the cost of MCU + USB-UART chip, it makes sense. The balance sheet is delicate :-)
Tsuneo