Modbus ASCII — frame format and LRC

Modbus ASCII framing (':' start, CR LF end, hexadecimal characters), the LRC checksum with a worked example, timing rules and when you still meet ASCII mode.

Modbus ASCII is the second serial transmission mode defined in Modbus over Serial Line. The PDU is the same as in Modbus RTU; only the framing and the checksum differ. Every byte is sent as two ASCII hexadecimal characters, so frames are twice as long but readable in a terminal.

Frame

FieldContent
Start: (0x3A)
Address2 characters
Function2 characters
Data2 × n characters
LRC2 characters
EndCR LF (0x0D 0x0A)

Default character format: 7 data bits, even parity, 1 stop bit (7E1); other formats are allowed if both sides agree. Inter-character gaps up to 1 s are allowed, so ASCII works over slow modems and radios where RTU's 1.5/3.5-character timing would fail.

LRC — longitudinal redundancy check

  1. Add all bytes of address, function and data (as binary bytes, not characters), ignoring carries above 8 bits.
  2. Take the two's complement of the result.

Example: read 1 holding register at address 0 from slave 1 → bytes 01 03 00 00 00 01. Sum = 0x05, two's complement = 0xFB. Frame: :010300000001FB + CR LF.

RTU vs ASCII

RTUASCII
Bytes on the wire1 per byte2 per byte + start/end
Error checkCRC-16LRC (8 bit)
FramingSilent intervals (3.5 characters): … CR LF
Use todayAlmost all devicesSome older devices, modems, data loggers, devices with ASCII-only protocol options

A device on one serial line must use one mode; RTU and ASCII cannot be mixed on the same bus.

Loading the map…

Sources

  1. MODBUS over Serial Line — Specification and Implementation Guide — Modbus Organization
  2. MODBUS Application Protocol Specification — Modbus Organization

Updated 2026-10-04