SX52 with LM92 thermal Sensor - Master ACK - Alternative Methods?
dlowery
Posts: 1
I have about two weeks under my belt playing with micro controllers at assembly level. So I figure I am missing something obvious here that some old dogs already know.
The attached code works great except it will not capture the first bit of the second byte if that bit is HI. I have tried different timings and different LM92 Chips. The LM92 requires an ACK from the master before it will send the second byte. So the only thing I can think is that I am not applying the ACK as effectively as I could. Especially, as I see a small pulse high just before the ACK clock pulse. All the LM92 chips work report correctly with an Arduino and I do not see the weird pulse.
The attached code works great except it will not capture the first bit of the second byte if that bit is HI. I have tried different timings and different LM92 Chips. The LM92 requires an ACK from the master before it will send the second byte. So the only thing I can think is that I am not applying the ACK as effectively as I could. Especially, as I see a small pulse high just before the ACK clock pulse. All the LM92 chips work report correctly with an Arduino and I do not see the weird pulse.
Comments
Second, you may try this, to ensure that SDA doesn't glitch high on your ACK:
Lastly, and this I can't speak to based on your Arduino tests, your assembly I2C routines don't account for clock stretching. Suppose it's possible your slave device is clock stretching before the second byte (but seems less likely given the behavior you report).
You could also try using SX/B which contains really solid ready-to-go I2C routines.