- What this example do?
- How I must configure my ORbit16™ to work with this example?
- Where I can learn more about this?
- Download this example!
In this example we are going to use the USB of the ORbit16™ as USB Device using the CDC (Communication Device Class). The ORbit16™ connected through the USB cable will be recognized as a COM port.
You must open any terminal software (such as Hyperterminal) using any baudrate (with USB any value works fine), 8 data bits, no parity, 1 stop bit.
When you press SW2, you can see “Button pressed” in the terminal window. When you press a button on your PC Keyboard, ORbit16™ will receive it and answer back. In this example we will use the SprintF function to modify a string replacing a value.
After the programming with bootloader you press the reset button on ORbit16™: now your OS will retrieve a new peripheral and then will ask you the drivers: they are placed in the folder “drivers” of the zipped example at the end of this page.You can use any terminal software on your pc to see how this demo works:
It’s higly reccomended you read the Application Note 956 : Migrating Applications to USB from RS-232 UART with Minimal Impact on PC Software. This document will explain you the CDC functions used in this demo. You’ll notice some functions has different names: mUSBUSARTIsTxTrfReady in the document is now USBUSARTIsTxTrfReady. You can read the source code of usb_function_cdc.c file to get more information on this issue.Serial emulation over USB (USB CDC Basic Demo) (159 downloads)