The DEVICE source code illustrates how to implement on the AVR32 microcontroller a Serial to USB application.
Serial to USB application architecture
For our example, we will only use a PC for the demonstration: it will both connect to the USB and to the COM port of the EVK110x boards.
Connect the USART peripheral to the USART connector of the EVK110x board. Connect the application to a USB host (e.g. a PC) with a mini-B (embedded side) to A (PC host side) cable. The application will behave as a virtual COM.
EVK1100 USB Device Mode
EVK1101 USB Device Mode
For the first connection of the EVK110x board on the PC, the operating system will detect a new peripheral. This will open a new hardware installation window. Choose «No, not this time” to connect to Windows Update for this installation and click ‘Next’:
Found New Hardware Wizard
On the next screen, select “Install from a list or specific location (Advanced)” and click ‘Next’. Then request to search in the DRIVER folder of the "CDC EXAMPLES" directory as shown below and click ‘Next’
location
A warning message "The software [...] has not passed Windows Logo testing..." will appear. Click on "Continue Anyway":
Warning
Windows will then process the installation of the driver. Once completed, click ‘Finish’.
Installation done
For our example, we will use 2 serial terminals (e.g. HyperTerminal under Windows systems or minicom under Linux systems; USART settings: 57600 bauds, 8-bit data, no parity bit, 1 stop bit, no flow control):
- One on the virtual COM, known as "AT32UC3xxx CDC USB to USART" (known as "Virtual Serial Term" in this document). You will find the virtual COM number in the Windows Device Manager, as shown hereafter (in this example, the virtual COM port number is COM6):
Installation done
- One on the COM on which the EVK110x serial output has been connected to (known as "Serial Term" in this document).
Open the 2 terminals using the same baudrates.
- Any characters typed on the "Virtual Serial COM" terminal will be transferred from USB through USART and thus be dispayed on the "Serial Term"
- Any characters typed on the "Serial COM" terminal will be transferred from USART through USB and then be dispayed on the "Virtual Serial Term"
Note that the serial parameters (baud rate, stop bits, etc...) of the "Virtual Serial Term" are automatically applied on the "Serial COM" USART.