FreeMODBUS
A portable MODBUS ASCII/RTU and TCP implementation
A portable MODBUS ASCII/RTU and TCP implementation
The hardware requirements are minimal
Operation is possible with and without an operating system. If a RTOS is available event queues can be used to avoid busy waiting within the MODBUS task (See STR71X/FreeRTOS). For systems running without RTOS a polling based approach in combination with a global variable can be used (See Atmel AVR port)
The actual memory requirements depend on the used modules. The first table shows the required memory with all supported functions compiled in. Values for the ARM where obtained using the GNUARM compiler collection 3.4.4 with -O1 in ARM mode. The AVR values where obtained using the WinAVR compiler collection 3.4.5 with -Os.
Module | ARM Code | ARM RAM (static) | AVR Code | AVR RAM (static) |
---|---|---|---|---|
Modbus RTU (Required) | 1132Byte | 272Byte | 1456Byte | 266Byte |
Modbus ASCII (Optional) | 1612Byte | 28Byte | 1222Byte | 16Byte |
Modbus Functions [1] | 1180Byte | 34Byte | 1602Byte | 34Byte |
Modbus Core (Required) | 924Byte | 180Byte | 608Byte | 75Byte |
Porting Layer (Required [2]) | 1756Byte | 16Byte | 704Byte | 7Byte |
Totals | 7304Byte | 530Byte | 5592Byte | 398Byte |
[1]: Actual size depends on configued MODBUS functions. Function can be enabled/disable using the header file mbconfig.h.
[2]: Depends on the hardware.