> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oryx.mechatronstudio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# UART generator

> Create TX and RX serial conversations with every supported character format.

UART sends data over a serial line. Each character has a **start bit**, **data bits**, an optional **parity bit**, and **one or two stop bits**. The generator draws those bits from your messages: **one timeline step equals one bit**.

You can create the full range of UART signals supported by the editor: every available combination of data bits, parity, stop bits, bit order, and polarity; text or byte messages, TX and RX, pauses, and up to **eight UART ports** when enough channels are available. A port may use one channel for each direction.

## Create your first exchange

**1. Open UART**

In digital mode, click **Generators → UART**. The initial format is `8N1`: eight data bits, no parity, one stop bit.

**2. Choose TX or RX**

**TX** is what your device sends; **RX** is what it receives. They are drawn on separate lines.

**3. Type a message**

Keep **Text** mode and type `AT` on TX. Press **Enter** or **Add to the signal**. Switch to RX and add `OK`. Requests appear on the right of the chat, replies on the left; both appear as bits on the timeline.

**4. Inspect a character**

In `8N1`, each character takes **10 steps**: start + 8 data + stop. Use **Show in the signal** on a message to find it. The [UART interpreter guide](https://docs.oryx.mechatronstudio.com/en/protocols/uart.md) explains the start, data, and stop bars.

## Enter data

| Mode | Example | Use |
| - | - | - |
| **Text** | `Hello`, `AT\r\n`, or `\x1B` | Commands and text; supports escapes such as `\n`, `\r`, `\t`, and `\xFF` |
| **Hexadecimal (`0x`)** | `55 AA 01 FF` | Exact byte values, including nonprintable ones |
| **Decimal (`123`)** | `85 170 1 255` | The same values written in base ten |

The **line ending** button appends nothing, `\n`, `\r`, or `\r\n` to **every text message**. This is useful for commands that expect Enter, such as many AT commands. You can also change it in settings. Numeric modes do not append it.

> [!NOTE]
>
> **Text** is unavailable with **5 or 6 data bits**: use hexadecimal or decimal. Numeric values outside the selected bit width are not sent and are marked in the panel. If a text character exceeds the width, the panel warns that it will be truncated.

## Set the character format

Click the format button in the top bar, showing something like `8N1`. Quick presets are `8N1`, `8E1`, `7E1`, and `8N2`; you can also set each control separately.

| Setting | Options | Effect |
| - | - | - |
| **Data bits** | 5, 6, 7, 8, 9 | Bits in each character |
| **Parity** | None, even, odd, always 1, always 0 | Adds a checking or fixed bit |
| **Stop bits** | 1 or 2 | Length of the character's end |
| **Bit order** | LSB or MSB first | Which end of the number goes first; LSB is standard UART |
| **Polarity** | Normal or inverted | Normal idles high; inverted idles low |

For example, `8E1` means eight data bits, even parity, and one stop bit. The format applies to all UART messages in the panel. Inverted polarity can represent an RS-232 line as seen on the cable.

## Ports, pauses, and parallel messages

Use the **UART 1** selector to add ports, up to eight. Each has its own **TX** and **RX**. Add a message to the current port before adding the next; every line needs a free channel. Port options let you show its channels, change its color, swap TX and RX, or delete it. Deleting a port also removes its messages and channels.

Under **Settings → Pauses**, **Between characters** leaves the line idle inside a message; **Between messages** separates transmissions. The panel keeps these pauses in a range where messages remain separate when decoded. By default, characters have no gap and messages have **50 steps** between them.

Each port takes its channels with their direction: **TX transmits and RX receives**. When running on the ESP32, what you write on RX is the expected response: the device listens to it and compares it (see [Reception](https://docs.oryx.mechatronstudio.com/en/device/reception.md)).

**In parallel** starts a message with the preceding one if its line is free, for example on TX and RX or on separate ports. If its line is busy, the message goes next and the panel tells you.

> [!NOTE]
>
> This panel defines the bits, not the baud rate. When playing on a device, the rate in **bps** sets each step's duration, such as 9600 or 115200 bps.

## Change an existing message

Each message can be **shown in the signal, edited, duplicated, moved, deleted, or switched between TX and RX**. After changing the format or line ending, check the chat's byte counts and warnings: the generator rebuilds the signal using the new settings.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.