Go Down

Topic: Arduino Zero as I2C slave. NAK address. (Read 720 times) previous topic - next topic

OMac

Oct 01, 2015, 09:23 am Last Edit: Oct 01, 2015, 06:14 pm by OMac
Hi All.

I'm currently working on a project involving I2C and the Arduino Zero.

Using a Zero as the master and a few other peripherals (I2C ADC, port expander etc) as slaves works perfectly. I have the correct pull ups and have a pretty reasonable understanding of the I2C protocol, however, when I try and set another Zero as a slave, the slave Zero doesn't acknowledge it's address.

I stripped my problem down so that i only have a master Zero and a slave Zero, and used the examples on https://www.arduino.cc/en/Tutorial/MasterWriter , just to make sure I wasn't making a silly mistake. By watching the bus on a logic analyser the master sends the request to write to the slave address, but the slave Zero doesn't acknowledge.

I upload the exact same code to a pair of atmega 2560's and it runs just fine, therefore I'm 100% sure the software and electronics are correct. Through a bit of digging around someone has suggested that it may be due to onReceive() not functioning correctly.

Has anyone got any thoughts on this matter, or if the softwareI2C library works on the zero?

Thanks

Go Up