This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Programming TMP102/TMP112 using TWI

Has anyone had any success setting the configuration register on TMP102/112 temperature sensors via I2C? I'd like to switch the sensor to one-shot mode to further minimise current usage - I'm on a mission to hit 3uA when sleeping and next step is shutdown the temp sensor between reads.

I would really benefit from a coded example to work with to bridge the gap between the TWI documentation and the sensor datasheets

Parents
  • Hi

    I have posted a basic TWI driver example here. It is based on the drivers found in SDK V9.0.0 and simply scans your TWI bus for devices. It does not send any commands or anything like that. I'm afraid I don't have any TMP sensors to play with so I can't make a real example for you

    Achieving what you want shouldn't be that difficult though.

    1. Send a write command to the TMP's address (addresses specified in Table 4 in the TMP102 datasheet).

    2. Continue with an memory address byte pointing to the configuration register (should be 0x01 according to Table 7).

    3. Finally transmit two bytes where the last bit (the SD field) in the first byte is set to to shut the device off. I think the datasheet is a little unclear regarding the byte order so it might be the last bit in the last byte.

  • Very many thanks, Martin. Very helpful - I think I understand. I agree the datasheet is ambiguous about byte order and have contacted TI to point that out. I will test and post back here when I am confident I know what the answer is.

    By the way, is your first sentence missing a link?

Reply Children
No Data
Related