This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1119: I2C Errer

Part Number: ADS1119
Other Parts Discussed in Thread: ADS1120, ADS112C04

Yellow SCL
Blue SDA

About the situation
Only the slave (ADS 1119 address is 0 × 49) and the master-side bus buffer (P 82 B 96 TD) are connected to the bus.
The following operations were performed when performing READDATA.
As indicated by the waveform of the oscilloscope, the slave IC returns ACK at 8CLK.

Question
・Why does the slave IC (ADS 1119) return ACK at 8CLK?
・Is there a solution?

Thank you and best regards,

  • Hi Kazuya,

    The communication is coming from the micro.  The RDATA command structure is shown in the ADS1119 datasheet in 36.  From the scope plot it appears that the communication writing the RDATA command is working as expected, but the read of the data never completes as it is incorrectly addressing the device as the last bit is set low (device write) instead of high (device read). 

    The structure of the communication is a Start followed by the device address + write (+ ACK) followed by the RDATA command (+ ACK) followed by a Repeated Start then device address + read (+ ACK).  However the ADS1120 is seeing a Repeated Start followed by a device address + write instead of a read which is incorrect communication with respect to the format .

    So correcting the communication to the correct format should resolve the issue.

    Best regards,

    Bob B

  • Hi Bob B

    If you look at the photo of the oscilloscope, you can see that the last bit of the SDA has dropped to 0V.
    When the master is set to LOW, the voltage is about 0.8 V. When the slave is set to LOW, the voltage is set to 0 V.
    From the above, it can be seen that the SDA is set to LOW when the slave is 8CLK.
    What is the cause and solution to this problem?

    Best regards

  • Hi Kazuya,

    Are there other devices on the I2C bus?  Is this same response seen every time you try to read from the ADS1119?  Do you see any issues if you write and read registers?

    If the ADS1119 is pulling the SDA low, then there is likely a small glitch of the SCL not captured on the oscilloscope.  Do you have a schematic that you can share?  What value of resistance are you using for the I2C bus pullups?  Are there long wires being used between the micro and the ADS1119?

    Best regards,

    Bob B

  • Hi Bob

    In addition to the I2C bus, there is only a bus buffer on the master side.
    The usage is 20 msec polling of RDATA, and the frequency of error is 1 or 2 times a day.
    When reading and writing registers, WREG is used once for the initial setting, but there is no problem. RREG is not used. The error occurred during RDATA.
    The I2C bus has a pull-up resistance of 2.2 kΩ.
    The wire between micro and ADS 1119 is about 100 mm to 200 mm.
    We have confirmed that the Signal Integrity and timings in the data sheet are correct.
    Therefore, I think there is no problem in terms of hardware.

    Best regerds

  • Hi Kazuya,

    Even a short wire of 100 to 200mm can act as an antenna to pick up EMI/RFI in the environment.  So even though the design itself is correct with respect to the communication timing, any noise picked up on the SCL can be seen as a transition.  It would be helpful to remove the wires altogether and use a PCB trace connection or at least reduce the wire length as much as possible.

    Also the wire itself can add significant capacitance to the bus.  You could try reducing the pullup resistance further to see if this helps.  Also the ground connection between the ADS1119 and the micro is important.  This should be a low impedance connection.

    Best regards,

    Bob B

  • Hi Kazuya,

    One additional comment.  If there is a transmission error, then you should have a method for determining an error due to a NACK condition and then handling appropriately.  I have seen lots of customer code that assumes there will be no communication errors.  With I2C communication there should always be error detection and a handling routine.

    Best regards,

    Bob B

  • Hi Bob

    Does it mean that ADS 1119 has a defect that operates differently from I2C's communication protocol?
    Also, is the defect improved in ADS 112 C04?

    Best regerds

  • Hi Kazuya,

    The ADS1119 and the ADS112C04 share the same digital interface.  The ADS1119 does follow the I2C communications protocol and supports Standard, Fast, and Fast+ modes.  The I2C timing requirements are given in the datasheet in section 6.6.  The testing uses bus capacitance between 10pF and 400pF.  The pullup resistor is 1k. Using wire connections will add bus capacitance.  Changing the pullup to 1k may also improve the communication.

    If we go back and look at the original scope shots you provided of the communication, We see a:

    1. START
    2. followed by <Address + W> ACK
    3. followed by <RDATA command> ACK
    4. followed by a STOP
    5. followed by a START
    6. followed by  <Address + R> NACK

    And here is when it appears the peripheral is not fully completing the communication.  Normally the ACK would begin on the falling edge of the 8th SCL and hold low through the 9th clock.  Note that at the point of discrepancy that the transition appears to take place on the rising edge of the 8th SCL and not the falling edge.  This is where I suspect a glitch is taking place that is small enough to not show on the scope plot but also long enough to register as a clock pulse at the ADS1119.

    If there is a communication error, there should be an error handling routine in the firmware.  You cannot assume that the communication will always work as expected.  In the scope shot, it appears that the communication never actually completes.  Maybe it does and just not shown.  But I have seen may cases where there is no error handling routine for communication or bus error with I2C where the bus will hang requiring a reset.

    Another thing to try is to issue a Repeated Start instead of a Stop and Start between the write and the read.

    Best regards,

    Bob B

  • Hi Bob

    Does that mean that the ACK is usually initiated at the falling edge of the 8th SCL, but is recognized as a clock due to a small glitch?
    If a small glitch is recognized as a single clock pulse, does ACK occur at the falling edge instead of the rising edge?
    Why does an ACK occur at the rising edge when an error occurs, usually at the falling edge?
    I am trying to confirm with a more accurate oscilloscope, but at what Hz does ADS 1119 recognize it as a clock pulse? Also, when I check with an oscilloscope, which timing should I watch?

    Best regards

  • Hi Kazuya,

    As the ADS1119 can respond to clocking for fast+ mode, the clock for SCL will work normally up to 1MHz (1us period).  Have you tried using a pullup at 1k?

    Just to make sure I'm understanding the situation completely, how often do you see this issue?

    Best regards,

    Bob B

  • Hi Bob

    The cause of the error is that a 1 MHz glitch occurred before the 8 clock of SCL, so it returns NACK at the rising edge?
    Why does it return NACK at the rising edge??

    Errors occur only once or twice a day.

    Best regards

  • Hi Kazuya,

    I believe that your drawing is a mostly accurate representation of what is going on except in the error state the 8th clock falling edge will return SDA back high and the micro will see a NACK at the 9th clock.  In the normal case, SDA returns high on the falling edge of the 9th SCL which signals an ACK.  The ADS1119 is seeing the glitch as a clock.  The datasheet is showing for fast+ the following information:

    If there is a slight ring on the clock edge or a transient that goes low for 500ns, the ADS1119 will see this as a valid clock.  Consider that noise can be picked up on the wiring or there could be some form of ground bounce that may also be a factor.  If you are making the connection to the ADS1119 via wires, how is the DVDD and GND connected between the micro and the ADS1119?

    A logic low for SCL is 0.3*DVDD.  If the DVDD for the ADS1119 is 5V, then a logic low is 1.5V or less.  The glitch to be considered a logic low only needs to go to 1.5V on SCL.

    Let's consider that this glitch is taking place, and all possible improvements have been made.  The question still remains in how is the firmware handling a NACK?  You cannot have perfect communications for all time.  Events can happen where you would receive a NACK. 

    Something like the following should be implemented in your code:

    1. Transmit the desired communication
    2. If ACK, proceed to 4 otherwise if NACK go back to 1 and retry (here you can set a retry limit, and let's say you retry 10 times)
    3. If communication fails after 10 attempts, then send an alert to require user intervention that communication cannot be completed and abort the communication process
    4. Complete the desired function or routine

    Best regards,

    Bob B