UART Terminal Tutorial
UART Terminal Overview
The UART Terminal
in NECTO Studio is a tool for establishing UART communication between your development board and your computer. This feature is essential for debugging and data exchange during embedded system development.
How to Access the UART Terminal
You can access the UART Terminal
in two ways:
-
Main Menu Bar: Navigate to
Tools
->UART Terminal
. -
Vertical Left-Hand Sidebar: Go to the
Code
section, click onTools (CTRL+7)
, and then selectUART Terminal
.
Configuring the UART Terminal
Once the UART Terminal
interface is opened, follow these steps:
-
Connection Status: Check the information string for
Disconnected
orConnected
status. -
Options Configuration:
- Click the
Options
button to open the configuration window. - Populate the following settings:
- Port: Select the correct COM/serial port.
- Baud Rate: Choose an appropriate baud rate (e.g., 115200).
- Data Bits: Typically 8.
- Parity: None, Even, or Odd (typically None).
- Buffer Size: Define the desired buffer size (typically 1024).
- Flow Control: Select software or hardware control (typically None).
- Stop Bits: Usually 1 or 2 (typically 1).
-
Click the
Configure
button. -
Establish Connection:
- In the main interface, click the
Connect
button to establish UART communication with the microcontroller.
Using the UART Terminal Features
Once connected, the UART Terminal
interface provides the following features:
- Display Options:
Show Timestamp
: Enable timestamps for received data.CR
(Carriage Return) andLF
(Line Feed): Append control characters as needed.Instant Send
: Send data immediately as you type.-
Loop Every __ ms
: Repeatedly send data at a specified interval. -
Data Transmission:
- Enter data in the input field. Use the
HEX
option if sending hexadecimal data. -
Use the
Send data
option to send data from a file. -
Received Data Section:
- Erase content if necessary.
- Display received data in ASCII, DEC, HEX, or BIN format.
Connecting Your Development Board
To connect your development board (e.g., Fusion for PIC v8
):
- Use the
USB-UART
USB-C connector. - Enable UART communication on the board:
- Adjust the UART Tx/Rx switches as per the User Manual.
Note for Linux Developers
If you encounter the error Could not connect to port: Permission denied ttyusb0
:
- Add your user to the
dialout
group:
- Restart your system or re-login for changes to take effect.
UART Terminal and Click Board™ Integration
In embedded development, Click boards™ play a crucial role in rapid prototyping by offering a wide range of plug-and-play peripherals that interface seamlessly with development boards via the mikroBUS™ standard.
A Click board™ is a small add-on board designed by MIKROE that carries various sensors, communication modules, displays, and other components. These boards connect to development platforms through a standardized mikroBUS™ socket, enabling fast and reliable hardware expansion without the need for complex wiring or soldering.
UART Communication and Click Board™ Examples
Most Click board™ examples that utilize UART communication are configured to operate at a baud rate of 115200 by default. This baud rate is widely used in embedded systems due to its balance between speed and reliability, ensuring stable data transfer across a broad range of applications.
When working with UART-based Click boards™ (such as GSM Click, GPS Click, or BLE Click), ensure that the UART Terminal
in NECTO Studio is configured to match this baud rate.
To do this:
- Access the
UART Terminal
(Tools
->UART Terminal
). - Open the
Options
window and set the Baud Rate to115200
. - Configure the remaining parameters (Port, Data Bits, Parity, Stop Bits) according to the Click board™ datasheet or example project.
- Click
Configure
and thenConnect
to establish communication with the board.
Why 115200 Baud Rate?
- Standardization – 115200 is commonly supported across microcontrollers, development boards, and Click boards™, reducing the need for additional configuration.
- Efficient Data Transfer – This baud rate strikes a good balance between speed and error resilience, suitable for both high-speed data transmission and low-latency control applications.
- Cross-Compatibility – Using a consistent baud rate across all Click board™ examples ensures developers can switch between boards without reconfiguring UART settings, streamlining the development process.
By maintaining 115200 baud as the default, Click board™ users can reliably interact with different modules, reducing the potential for communication errors and ensuring smoother prototyping and testing.
What If My Development Board Lacks an Onboard USB-UART Bridge?
Some development boards, such as the Clicker 2 for PIC18FJ, do not feature an onboard USB-UART bridge like the FT230XQ or similar ICs. This can make direct UART communication with a PC challenging.
Solution – Use a USB UART Click on mikroBUS™
If your development board lacks a dedicated USB-UART bridge, you can achieve UART communication by utilizing a USB UART Click board™ directly on one of the mikroBUS™ slots.
USB UART Click boards integrate a USB-UART bridge circuit (such as FTDI or MCP series chips) and provide seamless communication between your development board and PC. These Click boards™ handle UART-to-USB conversion, effectively bypassing the need for an onboard bridge IC.
How to Set Up USB UART Click
- Insert USB UART Click into an available mikroBUS™ slot on your development board.
- Connect a USB cable to the USB port on the Click board™ (usually USB-C or micro USB).
- Select the appropriate UART pins in NECTO Studio by configuring the
UART Terminal
to communicate via the mikroBUS™ slot where the Click is installed. - Configure UART Terminal:
- Set the Baud Rate to
115200
(default for most Click board™ examples). - Adjust
Port
,Data Bits
,Parity
, andStop Bits
as needed. - Connect to UART Terminal by selecting the USB UART Click's serial port from the terminal options.
Benefits of Using USB UART Click
- Modularity – Easily add USB-UART functionality to any development board without hardware redesign.
- Portability – Swap the USB UART Click between multiple boards during prototyping.
- Cost-Effective – No need to purchase new development boards with onboard UART bridges.
- Flexibility – Compatible with any mikroBUS™-equipped development platform.
By leveraging USB UART Click boards™, developers can ensure consistent UART communication across various projects, even if their primary development platform lacks native USB-UART bridge circuits.
USB UART Click – Seamless USB to UART Communication
If your development board lacks an onboard USB-UART bridge, the USB UART Click Category series provides a simple and efficient solution for enabling UART communication. These Click boards™ feature high-quality USB-UART bridge ICs (such as FTDI and MCP chips), allowing easy interfacing between your development board and a PC via USB.