![]() Have a look at this alternative I2C library. Here I should say that I am using the "second" I2C in an Arduino Due, so maybe this issue is only found in this especific case. The image in my previous post was made when using 50 kHz. In this case, I think I was using a 400 kHz clock. I can correctly read data from this one, even though I have the same issue when I look the SDA and SCL lines. I have given a try to a different device I have on my board: a LIS3MDL magnetometer. Therefore, I should see how the SDA line goes momentarily high, but I don't. It releases the SDA line during the falling edge of SCL clock corresponding to the ackowledge. I have simulated the I2C slave implemented on the FPGA. Here is another capture of a Write/Restart with a MCP79410 RTCC using Restart:įirst of all, thanks for your help and comments. Try slowing down the I2C, if it is really a problem with Wire.h you should see your device releasing SDA after the ACK. If you specified a RESTART, when the device releases SDA it should go high.įrom your screen grab I don't see the device Releasing SDA until your first vertical marker? You should see a blip between the ACK and the STOP. The Ardunio Drives SDA at 28us (for a Stop condition),Īt 37us the Arduino release SDA, (Causing a STOP)Īt 63us the Arduino Drives SDA, (causing a Start) The Device(24LC512 EEPROM) releases SDA at 23us ![]() Included is a screen grab of a ACK, STOP, and Start. I don't see any separation between the ACK and the STOP? I would look at your device, when is your device releasing the ACK signal? However, this is probably not an issue for most I2C slaves (but for mine ).Īfter the Ack clock period, the master does not pull the bus low during the next low period. This is not a repeated start, this is a stop followed by a start! On the other hand, Wire library "repeated start" is implemented as follows: The SDA line goes high and low when the SCL line is high. In the picture below you will see the specification of the repeated start:ĭo you see the difference? Exactly, in the specification, the SDA line goes high when the SCL line is low, and then, when SCL is high, SDA line goes low. Now, let's go to the I2C reference here: Repeated Start Condition – I2C Bus While communicating with a LIS3MDL magnetometer. In the attached image, between the vertical lines of the analyser cursors, you can see the "repeated start" condition of the function: Wire.endTransmission(false) I am having trouble communicating with an I2C slave implemented in an FPGA, so I checked what was going on in the SDA and SCL lines with a logic analiser. I am not so sure that repeated start has been implemented in the last release of the library.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |