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

# Modbus RTU Frame Builder and CRC-16 Calculator

> Build Modbus RTU request frames with the correct CRC-16, check the CRC of a captured frame, and see the matching Modbus TCP frame and 4xxxx address.

A Modbus RTU frame is the slave address, the function code, the data, and a 2-byte **CRC-16**. Get one byte wrong and the slave stays silent. Use the builder to create a correct request, or paste a frame from a serial sniffer to check its CRC.

## How the frame is built

```text theme={null}
Read holding registers (function 03), slave 1, address 0, 10 registers:

01        slave address
03        function code
00 00     start address (0-based)
00 0A     number of registers
C5 CD     CRC-16, low byte first
```

* The **CRC-16/MODBUS** starts at `FFFF`, uses the polynomial `A001` (reversed `8005`), and is sent **low byte first**.
* **Addresses are 0-based on the wire.** The holding register that a manual calls `40001` is address `0` in the frame, `40010` is address `9`.
* **Modbus TCP** has no CRC. It puts a 7-byte MBAP header in front instead: transaction ID, protocol ID `0000`, length, and the unit ID.

## Related

> [card] [Modbus float converter](https://wiki.codeandcompile.com/tools/modbus-float-converter.md)
>
> Turn the two registers you read into a float in all four byte orders.

> [card] [Bit and number converter](https://wiki.codeandcompile.com/tools/bit-converter.md)
>
> Decode coils, status words and register values bit by bit.


## Related topics

- [Free Engineering Tools](https://wiki.codeandcompile.com/tools/index.md)
- [Code and Compile Wiki](https://wiki.codeandcompile.com/index.md)
- [IP Subnet Checker for Machine Networks](https://wiki.codeandcompile.com/tools/ip-subnet-checker.md)
- [Bit and Number Converter](https://wiki.codeandcompile.com/tools/bit-converter.md)
- [Modbus Float Converter](https://wiki.codeandcompile.com/tools/modbus-float-converter.md)


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