# How do I2C modules select between more than 2 slave addresses?

I am using the TMP112 I2C temperature sensor and noticed that you can choose between 4 slave addresses by connecting the A0 pin to V+, GND, SCL, or SDA.

How does the sensor tell between SCL, SDA, and V+?

It makes sense that V+ and GND can set the LSB of the slave address, but I am curious as to how the other two connections work.

I am using this sensor in an undergraduate senior project and am just curious about how this works. The answer won't affect my use of the sensor; I am just curious.

Thanks

Side note: this is my first question on StackExchange so any feedback on improving my questions is appreciated.

• I can see only two possible addresses in the datasheet. Selectable by connecting to either Vcc or GND. Where have you seen four? – Eugene Sh. Jun 1 '16 at 21:52
• @EugeneSh. - FYI, see section 7.3.2.2 on page 12 of the datasheet. It claims that the A0 pin can be connected to the 4 choices given by the OP, to select different I2C addresses. That's different to section 5 on page 3, were it only lists the 2 options which you mention. [Section 8.2.1 on page 25 also lists the 4 address options.] – SamGibson Jun 1 '16 at 21:57
• Hm. Interesting. Doesn't make sense, though... – Eugene Sh. Jun 1 '16 at 22:01
• Well, I guess it could configure itself on startup by sending some special sequence on these pins. Or doing it on runtime by comparing A0 with SCL and SDA – Eugene Sh. Jun 1 '16 at 22:07
• @DavidG25 - Re feedback, as you asked: (a) If you mention any device/component, provide links to their datasheets (if you don't have enough rep. for multiple links, then add them as text and ask someone with enough rep. to edit them into your posting); (b) explain the context of your question i.e. why are you asking a question? How exactly do you plan to use the answers? Lack of a clear reason & context for a question often leads to wasted effort by readers trying to clarify it, and so can deter them from wanting to reply. In short: Make it easy for readers to help you :-) Good luck! – SamGibson Jun 1 '16 at 23:13