Arduino slave working with Arduino master but not with another Master?


I am trying to communicate with an Arduino as a slave device using an i2c bus. The master device I am using is communicating at around 280 kHz. The slave can not acknowledge the call to the address.
I also tested communicating with the same Arduino slave but used another Arduino as master instead. This time at 400 kHz and 100 kHz and it acknowledges both. The wave forms and voltages look the same, I can't see any differences as to why it wouldn't work.
For the 2 arduinos used in this experiment they were both arduino Nanos with the atmega328p processor.
Please see images attached.

The slave code used was:

#include <Wire.h>
void setup()

Wire.begin(10); // join i2c bus with address #4
Wire.onReceive(receiveEvent); // register event
void loop()
// function that executes whenever data is received from master
// this function is registered as an event, see setup()
void receiveEvent(int howMany)
int x =; // receive byte as an integer
if (x == 1) {
digitalWrite(10, HIGH); // turn high
else if (x == 0){
digitalWrite(10, LOW);

The master code used was (in case of arduino to arduino):

#include <Wire.h>
void setup()

Wire.begin(); // join i2c bus (address optional for master)
byte x = 0;
void loop()
Wire.beginTransmission(10); // transmit to device #4
Wire.write("x is "); // sends five bytes
Wire.write(x); // sends one byte
Wire.endTransmission(); // stop transmitting

I would appreciate if there is any advice as to why the arduino would not get acknowledged by the other master device.

Please edit your post and insert code tags!

The master device I am using is communicating at around 280 kHz.

A rather strange frequency. Usually I2C devices communicate at 100kHz or 400kHz.

  Wire.begin(10);                // join i2c bus with address #4

Either fix or remove the comment!

  digitalWrite(10, HIGH);         // turn high

That won't work because the pin wasn't set as output.

Are you sure you connected the correct Arduino (slave) and not the one that runs the master sketch?

The scope output looks more or less correct, the only thing I noticed are the spikes into negative voltage. The Arduino might not like this. Are you sure you have connected the grounds?

Post a wiring diagram of the setup. What mystical device do you connect to? Link to datasheet, etc.?

Hi pylon,

Thanks for the response. The other master is the dspic processor datasheet:

I have attached images of the schematic part where the dspic connections are and the arduino side of the schematic.

good point about setting that pin as output, I will make sure to correct that. I am trying to get the acknowledge first. Yes, I am sure I connected the grounds and the correct arduino is plugged in.


Please insert the code tags!!

1k5 pull-ups are to small. Use at least 3k3. You can use the 1k5 on the other side because there the 1k are to small too.

I guess in the Arduino setup you eliminated the ADUM1250, didn't you? So that chip might have some influence on the result. Did you try the Arduino setup with the ADUM1250 in between them? The scope output is made on the Arduino side of the ADUM1250 I guess. Is that correct?

Remove the Wire.setClock() from the slave code.

How did you know that the Arduino-Arduino setup worked? Just by the scope output where you saw the ACK?

As you have split up the schematics into two part, are both on the same PCB? If not, what is the wire length between them?