PIC-IoT WA Development Board ( EV54Y39A) is an AWS pre-provisioned rapid prototyping IoT development board launched by Microchip.
What Is the Operating Principle of the CDC Virtual Serial Port?
The CDC (Communications Device Class) virtual serial port is a function of the USB composite device implemented by the on-board debugger. It establishes a bidirectional transparent UART data channel between the host PC and the target MCU. On the host side, terminal software can perform full-duplex data transmission and reception with the physical UART peripheral on the target board via the virtual serial port, with no extra RS-232 or USB-to-serial adapter hardware required.
The diagram below illustrates the working mechanism of the CDC virtual serial port integrated in the PIC-IoT WA on-board debugger.
(Images sourced from Microchip)
Data Transmission Paths
-
Host transmit → Target receive
Data sent from host terminal software → USB CDC TX → Debugger CDC TX pin → UART RX pin of target MCU
-
Target transmit → Host receive
UART TX pin of target MCU → Debugger CDC RX pin → USB CDC RX → Host virtual serial port → Received by terminal software
System Enumeration & Driver Installation
- Windows: Enumerated as Curiosity Virtual COM Port; the COM port number can be checked under the Ports section in Device Manager. Legacy Windows versions require the bundled driver included with MPLAB X IDE.
- Linux: Enumerated as
/dev/ttyACM*. Users need to join thedialoutuser group to obtain access permissions. - macOS: Enumerated as
/dev/tty.usbmodem*, which can be directly recognized as a modem device by terminal applications.
Supported Parameters & Limitations
| Parameter Item | Support Details |
|---|---|
| Baud Rate | 1200 bps ~ 500 kbps; values out of range will be automatically clamped to the nearest boundary; runtime modification is allowed |
| Data Bits | Fixed at 8-bit character length only |
| Parity Bit | Odd parity, even parity and no parity are all supported |
| Stop Bits | 1 stop bit or 2 stop bits selectable |
| Hardware Flow Control | Not supported |
Critical Signals & Operating Mechanisms
Necessity of the DTR Signal
The debugger will only enable transmit/receive on the CDC channel if the terminal software asserts the DTR signal. No data forwarding will occur without DTR assertion.
Engineer Tip: What Does Asserting the DTR Signal Mean?
DTR is a hardware control signal in serial communication, short for Data Terminal Ready.
Asserting the DTR signal means the host PC sets the DTR signal to the active state through the serial control channel, notifying the peripheral (the PIC-IoT WA on-board debugger in this case).
Frame Buffering & Efficiency Optimization
- Host transmission: Data is buffered in 64-byte USB frames for maximum transmission efficiency when full. Sending individual bytes at low baud rates reduces throughput due to the frame buffering mechanism.
- Target reception: Data is buffered up to 64 bytes before being uploaded to the host. Partially filled frames are forcibly transmitted after a roughly 100 ms timeout. A maximum of 8 pending frames are supported.
CDC Override Mode
Write a text file starting with CMD:SEND_UART= to the debugger mass storage drive to transmit data directly out of the debugger CDC TX pin. The default baud rate is 9600 bps; the existing configured baud rate is retained if previously set. A single message is capped at 50 characters maximum length.
Hardware & Software Pitfall Avoidance
Hardware Notes
The debugger CDC TX pin has no external pull-up resistor and floats when unused. The target MCU must enable its internal pull-up resistor on this pin to prevent spurious framing errors.
Software Notes
The terminal software must support DTR signal control; otherwise data communication will fail entirely. Baud rates must stay within the 1200 bps ~ 500 kbps range, otherwise the value will be forcibly adjusted automatically.
Engineer Tip
For low-baud-rate debugging, transmit data in batches to reduce the total number of USB frames and avoid poor efficiency caused by single-byte transfers. If garbled data appears, first check the baud rate configuration, DTR signal status and internal pull-up setup on the target side.
Related Documents
Related Products
- PIC-IoT WA Development Board ( EV54Y39A)
Related Articles
- Get Started Quickly with the PIC-IoT WA Development Board – A Quick Start Guide
- Get Started Quickly with the PIC-IoT WA Development Board – On-Board Resource Breakdown
- Get Started Quickly with the PIC-IoT WA Development Board – Power Supply Configuration Guide
- Get Started Quickly with the PIC-IoT WA Development Board – Online Programming Guide
- Get Started Quickly with the PIC-IoT WA Development Board – CDC Virtual Serial Port
