A minimal Arduino Uno example for the IS4350, the I2C Modbus TCP/IP Server chip by INACKS.
The sketch brings the Modbus TCP server online and increments Holding Register 0 (HOLD_0) by 1 every second. Any Modbus TCP client (a PLC, SCADA system or PC tool) can read the value over Ethernet.
No dedicated library is needed: the sketch uses only the standard Arduino Wire library and two short routines, one to read a register and one to write it.
- Writes an initial value to HOLD_0, so clients never read invalid data.
- Brings the Modbus server online by writing 1 to the
GO_ONLINEregister. - Waits until the
STATUSregister reads 5 (Modbus server ready and listening). - Increments HOLD_0 every second.
By default, the IS4350 uses DHCP and a MAC address generated from its serial number, so no network configuration is needed.
- Arduino Uno
- IS4350 (or the IS4350-M1 module)
- 2 × 4.7 kΩ pull-up resistors
- Ethernet connection to a network with a DHCP server
| Arduino Uno | IS4350 | Notes |
|---|---|---|
| A4 (SDA) | SDA | 4.7 kΩ pull-up to 5 V |
| A5 (SCL) | SCL | 4.7 kΩ pull-up to 5 V |
| GND | VSS | Common ground |
| — | ADR → GND | I2C address 24 (0x18) |
| — | SPD → GND | 100 kHz (Arduino Wire default) |
- Open the
.inofile in the Arduino IDE. - Select Arduino Uno and upload.
- Open the Serial Monitor at 9600 baud.
Expected output:
STATUS: 3
STATUS: 5
Server online.
HOLD_0 = 1
HOLD_0 = 2
...
- Read Holding Register 0 from any Modbus TCP client on port 502. Use the IS4350's IP address, which you can read from its IP registers.
- Register addresses and register values are 16-bit and are sent MSB first.
- Reads use a repeated start (
Wire.endTransmission(false)). - Leave a few milliseconds between consecutive I2C operations.
GO_ONLINEis 0 after every power-up, so the sketch sets it at startup.- If STATUS shows an error (101 and above), check the network cable and the MAC configuration. See the datasheet for the full list of status codes.
- IS4350 datasheet and product page: www.inacks.com/is4350
- IS4350-M1 module: www.inacks.com/is4350-m1