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.

LM92: Unable to get LM92 to ACK after sending control byte before read function

Part Number: LM92

Hi there,

I'm hoping that someone out there has had a similar issue and managed to solve it.

Basically, I am sending the control byte, comprising 0b10010011 (read temperature from user device address 01), but the byte only gets as far as sending 8 full clock pulses, and then the 9th (for the LM92 ACK of the control byte) is incomplete. I have attached a screen capture which shows the problem.

 Can anybody assist? Much appreciated for any help given.

Thanks.

  • Dear Clayton - 

    Could you try to insert the image again, please? It did not make it through 

  • Sorry guys, didn't notice it had failed to include the screen capture......rushing between tasks :(

  • Clayton - 

    it looks like in your graph at right before time  = 225.0 , the master NACKs and then a stop condition exists as SDA goes high while SCL is high. (similar to Figure 9 in data sheet, but slightly different) - also, are you bit banging this or do you have high value pullups on the SDA and SCL lines or do you have alot of bus capacitance? the signals look a little weak on the edges. 

     

  • Hi Josh,

    Thanks for the reply. I am not bit banging, but using the appropriate registers (SSP1BUF etc) to send/receive the data.

    The circuit does have 3K3 pullups on the SDA SCL lines (and the WPU's are disabled in the PIC.

    As to bus capacitance, the circuit actually has two sensors connected to the I2C bus. One on-board and one remote (on a long lead approx.4m) This issue, however, presents itself with both configurations, on-board only and both connected. I would expect the remote sensor (when connected) to affect the bus capacitance, and can compensate for this by changing (increasing) the clock high period to allow sufficient time for the line to reach maximum.

    I have since used another compiler (Proton) to do the same routine, and it works fine!!!! However, I must produce the MPLAB X version for my customer.

    Not sure if this is of help, but thanks anyway for the helpful comments.

    Regards.

  • Clayton - 

    Not sure what the difference in the compiler makes on this issue, but if you have another system which works, then compare the two and you should be able to see the difference as to what the root cause of your issue is. I do think that until you get the master to ACK back and not send the stop condition, you will have the issue. 

  • Hi Josh,

    Thanks again for the reply.

    I have removed the STOP command between the LM92 set-register-to-read control word and the next LM92 Read-Temp-Reg control command.

    This appears to have improved things. The error now only occurs sporradically, which is a move forward. Thanks.

    Here is the latest screenshot, when there is no error.

    I'm sure we are getting there. I will keep tweaking.

    Thanks for your help.

    Regards.

  • Clayton - 

    Great - let us know how it goes.