2.2 Use Cases for AVR DU With USB CDC

This section will discuss the motivations behind migrating to using USB on the AVR DU.

From simple communication to advanced applications, the simplicity of the CDC class makes it the first choice solution for many diverse implementations. Below are a few examples of where to use the CDC class in its most simple form.

Virtual Serial Port

Communication through a terminal session is one of the simplest ways to communicate through USB CDC. Setting up the AVR DU to be discovered as a virtual serial port enables the user to start a serial session and transfer data to and from the microcontroller. A serial session can be started through a terminal program or in a script or application, which makes it possible to have advanced host side applications communicating with the microcontroller.

Data Logger

Logging data and events from a device is a common use for external communication. The methods described above for the virtual serial port use case can achieve this.

Bridge Application

Bridging an application to other communication peripherals expands the connectivity of the connected computer. Some peripherals that could be bridged:
  • USART
  • I2C
  • SPI
In addition to internal peripherals, it opens up the possibility of using external transceivers connected to on-board peripherals to communicate over USB.
  • RS-485, RS-422, RS-232
  • CAN

Bootloader

Due to the CDC class utilizing simple communication packages, it is also suitable to work inside a bootloader without requiring host-side drivers. A simple script transmitting all bytes is all that’s needed.