Info:
On older Windows systems, a USB driver is required for CDC. This driver is included in MPLAB X
and Atmel
®
Studio installations.
3.1.1.2
Limitations
Not all UART features are implemented in the on-board debugger CDC. The constraints are outlined here:
•
Baud rate
: Must be in the range 1200 bps to 500 kbps. Any baud rate outside this range will be set to the
closest limit, without warning. Baud rate can be changed on-the-fly.
•
Character format
: Only 8-bit characters are supported.
•
Parity
: Can be odd, even, or none.
•
Hardware flow control
: Not supported.
•
Stop bits
: One or two bits are supported.
3.1.1.3
Signaling
During USB enumeration, the host OS will start both communication and data pipes of the CDC interface. At this
point, it is possible to set and read back the baud rate and other UART parameters of the CDC, but data sending and
receiving will not be enabled.
When a terminal connects on the host, it must assert the DTR signal. This is a virtual control signal implemented on
the USB interface, but not in hardware in the on-board debugger. Asserting DTR from the host will indicate to the on-
board debugger that a CDC session is active, will enable its level shifters (if available) and start the CDC data send
and receive mechanisms.
Deasserting the DTR signal will not disable the level shifters but disable the receiver so no further data will be
streamed to the host. Data packets that are already queued up for sending to the target will continue to be sent out,
but no further data will be accepted.
Remember:
Enable to set up your terminal emulator to assert the DTR signal. Without it, the on-board
debugger will not send or receive any data through its UART.
3.1.1.4
Advanced Use
CDC Override Mode
In normal operation, the on-board debugger is a true UART bridge between the host and the device. However, under
certain use cases, the on-board debugger can override the basic operating mode and use the CDC pins for other
purposes.
Dropping a text file (with extension
.txt
) into the on-board debugger’s mass storage drive can be used to send
characters out of the CDC TX pin. The text file must start with the characters:
CMD:SEND_UART=
The maximum message length is 50 characters - all remaining data in the frame are ignored.
The default baud rate used in this mode is 9600 bps, but if the CDC is already active or has been configured, the
baud rate last used still applies.
USB-Level Framing Considerations
Sending data from the host to the CDC can be done byte-wise or in blocks, which will be chunked into 64-byte USB
frames. Each such frame will be queued up for sending to the CDC TX pin. Transferring a small amount of data per
frame can be inefficient, particularly at low baud rates, since the on-board debugger buffers frames and not bytes. A
maximum of 4 x 64-byte frames can be active at any time. The on-board debugger will throttle the incoming frames
accordingly. Sending full 64-byte frames containing data is the most efficient.
PIC16F15376 Curiosity Nano
Curiosity Nano
©
2019 Microchip Technology Inc.
User Guide
50002900B-page 7
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from