I2C Slave will not send data to master when requested

Status
Not open for further replies.

smw97

New member
Hi,

I have a simple master and slave code for two teensy 3.6 devices which are communicating via i2c. The master sends the slave the slave address, then 0xAA, and requests the slave to send 3 bytes of data in return. The slave does not send data in response. Can someone provide me insight as to why the slave device does not send data to the master? The master and slave code is included below.

View attachment MASTER.inoView attachment SLAVE.ino



Thank you so much,

Sam
 
How do the SDA and SCL signals look on the oscilloscope? Which value are you using for the pull-up resistors? Do the two teensys have a common ground?
 
How do the SDA and SCL signals look on the oscilloscope? Which value are you using for the pull-up resistors? Do the two teensys have a common ground?

Hi,

I have attached an oscilloscope screenshot that shows how the master and slave are interacting. The yellow waveform is the data line, and the green waveform is the clock signal. I am using 4.7 kOhm pull up resistors. The teensys do share a common ground.

scope_0.png
 
Status
Not open for further replies.
Back
Top