Reliable bidirectional I2C communication between RSL10 (master) and Arduino (slave) using software I2C bit-bang implementation.
Embedded systems β’ Low-level protocols β’ 3.3V compatible β’ 90%+ success rate
This project implements reliable I2C communication between an ON Semiconductor RSL10-002GEVB (master) and Arduino Nano (slave). The RSL10 uses a software I2C bit-bang implementation, allowing flexible GPIO selection and reliable communication at 30-40 kHz.
| Feature | Description |
|---|---|
| π§ Software I2C | Bit-bang implementation on RSL10 GPIO |
| βοΈ Hardware I2C | Native Wire library on Arduino |
| Data transfer with acknowledgment | |
| β‘ 3.3V Logic | Direct connection without level shifters |
| π Error Handling | Retry logic and status codes |
| β 90%+ Success | Tested and verified reliability |
sequenceDiagram
participant RSL10 as RSL10 (Master)
participant I2C as I2C Bus
participant Arduino as Arduino (Slave)
Note over RSL10,Arduino: Address: 0x55
loop Communication Cycle
RSL10->>I2C: START condition
RSL10->>I2C: Send address + W (0xAA)
I2C->>Arduino: Address match
Arduino-->>I2C: ACK
RSL10->>I2C: Send data byte
Arduino-->>I2C: ACK
RSL10->>I2C: STOP condition
Note over Arduino: Process: data + 1
RSL10->>I2C: START condition
RSL10->>I2C: Send address + R (0xAB)
Arduino-->>I2C: ACK + response byte
RSL10->>I2C: NACK + STOP
Note over RSL10: Verify: response == data + 1
end
| Component | Description | Quantity |
|---|---|---|
| RSL10-002GEVB | ON Semiconductor dev board | 1 |
| Arduino Nano | 3.3V or 5V with level shifting | 1 |
| Resistors | 2.7kΞ© for I2C pull-ups | 2 |
| Jumper Wires | Male-to-male | 4+ |
| Breadboard | For prototyping | 1 |
| RSL10 Pin | Signal | Arduino Pin | Notes |
|---|---|---|---|
| 3.3V | VCC | 3.3V | |
| GND | Ground | GND | Common ground |
| DIO2 | SDA | A4 | + 2.7kΞ© pull-up |
| DIO3 | SCL | A5 | + 2.7kΞ© pull-up |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β I2C BUS WIRING β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β RSL10-002GEVB Arduino Nano β
β ββββββββββββ ββββββββββββ β
β β 3.3Vββββββββββββββββββββββββββββββ€3.3V β β
β β β β β β
β β DIO2 ββββββ¬ββββββββββββββββββββ¬ββββ€A4 (SDA) β β
β β (SDA) β β β β β β
β β β ββ΄β β β β β
β β β β β 2.7kΞ© β β β β
β β β ββ¬β β β β β
β β β ββββββ 3.3V βββββββββ β β β
β β β β β β
β β DIO3 ββββββ¬ββββββββββββββββββββ¬ββββ€A5 (SCL) β β
β β (SCL) β β β β β β
β β β ββ΄β β β β β
β β β β β 2.7kΞ© β β β β
β β β ββ¬β β β β β
β β β ββββββ 3.3V βββββββββ β β β
β β β β β β
β β GND ββββββββββββββββββββββββββββββ€GND β β
β ββββββββββββ ββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π΄ CRITICAL: Voltage mismatch can damage RSL10!
Configuration Status Arduino powered by RSL10 3.3V β Safe Arduino USB + RSL10 connected β Dangerous Using level shifter (3.3V β 5V) β Safe 3.3V Arduino variant β Safe
git clone https://github.com/surbalo1/RSL10-Arduino-I2C-Communication.git
cd RSL10-Arduino-I2C-Communication# Open arduino_slave/arduino_i2c_slave.ino in Arduino IDE
# Select: Tools > Board > Arduino Nano
# Select: Tools > Port > (your port)
# Click Upload
# Disconnect USB after upload- Import
rsl10_masterinto Eclipse IDE - Build the project
- Flash to RSL10 using J-Link
Follow the wiring diagram above with pull-up resistors.
RSL10 (SEGGER RTT Viewer):
TX: 0x00 β | RX: 0x01 β
[1] TX: 0x01 β | RX: 0x02 β
--- Stats: Success=10, Fail=0 ---
Arduino (Serial Monitor @ 115200):
Listening on 0x55
RX: 0x00 (0)
TX: 0x01
RSL10-Arduino-I2C-Communication/
βββ π README.md # Documentation
βββ π LICENSE # MIT License
β
βββ π rsl10_master/ # RSL10 firmware
β βββ include/ # Header files
β β βββ i2c_hal.h # I2C driver interface
β βββ source/ # Source files
β βββ main.c # Main application
β βββ i2c_hal.c # Software I2C implementation
β
βββ π arduino_slave/ # Arduino firmware
β βββ arduino_i2c_slave.ino # I2C slave implementation
β
βββ π docs/ # Additional documentation
βββ wiring_guide.md # Detailed wiring instructions
βββ troubleshooting.md # Common issues & solutions
- RSL10 (Master) sends a byte to Arduino at address
0x55 - Arduino (Slave) increments the byte and stores response
- RSL10 reads back the response
- RSL10 verifies:
response == original + 1
| Parameter | Value |
|---|---|
| Slave Address | 0x55 |
| I2C Speed | ~30-40 kHz |
| Implementation | Software bit-bang (RSL10) |
| Read/Write Delay | 100ms recommended |
| Metric | Value |
|---|---|
| I2C Clock | 30-40 kHz |
| Success Rate | 90%+ after initial sync |
| Recommended Delay | 100ms between transactions |
| Wire Length | <20cm recommended |
In i2c_hal.c:
#define I2C_DELAY 250 // Higher = slower, more reliable| File | Line |
|---|---|
| Arduino | #define SLAVE_ADDRESS 0x55 |
| RSL10 | #define ARDUINO_ADDR 0x55 |
| Tool | Purpose |
|---|---|
| Eclipse IDE | RSL10 development |
| RSL10 SDK | ON Semiconductor libraries |
| J-Link | Debugging & flashing |
| SEGGER RTT | Debug output |
| Arduino IDE | Arduino programming |
| Issue | Solution |
|---|---|
| No communication | Check wiring, pull-ups, common ground |
| Intermittent failures | Increase I2C_DELAY, shorten wires |
| NACK on all addresses | Verify slave address matches |
| Noisy signal | Add 100nF capacitor near Arduino |
MIT License - see LICENSE file.
- ON Semiconductor RSL10 SDK
- Arduino Wire library
- Open-source I2C community