Introduction
Author: Alexandru Niculae, Microchip Technology Inc. |
The purpose of this document is to describe step-by-step how to configure the USART peripheral on megaAVR® 0-series, tinyAVR® 0- and 1-series, and AVR® DA devices. While this is a complex peripheral and can work in various modes, this document will use it in Asynchronous mode for the following use cases:
- Send ‘Hello
World’ to a Terminal
Demonstrates how to send a string to the PC and show it in the terminal.
- Send
Formatted Strings/Send String Templates Using
‘
printf
’Enhances the first use case with the ability to use the ‘
printf
’ function to send strings over USART. - Receive
Control Commands
Many times, the USART is used to implement a command-line interface. This way, the microcontroller can receive control commands via the USART.
Additionally, this document provides information on how to configure the USART in Synchronous mode and One Wire mode.