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?
> Or otherwise is there a general example of the cdc class implementation for the 8051 somewhere?
TI provides a custom device driver for TUSB3410. It doesn't follow CDC spec exactly, like FTDI. General examples for CDC is not so helpful for your purpose.
Tsuneo
In general, 8051's rely upon specific hardware to do the bulk of USB - so there isn't any such thing as a "general 8051" implementation and, therefore, there can't be any general examples for it!
What difficulties, exactly, are you having?
The device operation is, of course, entirely independent of what tools you use to build your code.
So, it might be easier to go back to the TI documentation and work from there; just using the IAR code for reference for any points of doubt...?
Have you spoken to your distributor to see if they can help?
Unfortunality the TI's documentation is not comprehensive, the device's specsheet is about the only good documentation. The problems I am having is looks like the sample code is not complete, some functions only have prototypes, they have also implemented the rtk which also gives compiler errors like recursive/reentrant functions, and some memory problems. I have changed a lot of the commen errors etc. The code was developed quite a couple of years back and the support from TI was not really good - it looks like the code was eveloped in any case by 3rd parties. I does not have usb knowledge and is kew to the 8051 as well, i have managed to complete a part of my coe the communicate on the uart side, i just need to get the usb side up and running, but I do not have a lot of time to sort out the faults. Is there a place where one can post the software - I bet there is some clever okes that could sort it out quite quickly. I considering cutting my losses and going for microchip which has lots of sample code, very good documentation, and the development environment is free.
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 :-)