I have a couple of TMP75 sensors. On chip digital temperature sensor with two wire interface.
You would think it should be straight forward getting this baby to talk to the Cerb main board…
I tried to follow the help vide over here https://www.ghielectronics.com/docs/12/i2c - and I’ve been peeking on the source code for other modules, but I cannot get it to play ball.
I think I have the right address, and even did a for/loop with address 0x00 → 0xFF and having it try to connect to the different addresses.
I’m using the break out module to connect to the chip, and I have checked and re-checked that the connections are correct according to the pin-out on the socket and the pins on the sensor. I have tried different chips, just in case one might be faulty.
No matter what I do, all i get is InvalidOperationException when it tries to create the I2CDevice…
I have been looking at the I2C code as well. I am trying to talk to a MLX90614ESF-BAA infrared thermometer. I am connected to pins 8 and 9 on socket 2. I don’t understand why the code does not require the pins to be defined as they are in the code at https://www.ghielectronics.com/community/codeshare/entry/236
The sensors all come from an old iMac. They are all on a small PCB like this.
Only v+ gnd clock and data are connected to the socket. But as they all worked in the iMac, I guess there should be no problems with the board nor the sensors…
Edit: the Arduino community says all these sensors are wired up with address 0x48 and 0x49 - and they work fine with Arduino boards, so I see no problem using it with our stuff…
OK, tried 100… Now it loops trough address 0x40 to 0x4F, starts back at 0x40 and this time when it gets up to 0x4B (tried a new sensor) - this time it connects.
Reading out values only returns 0x0 and 0x0 for the two bytes i get back from the sensor… but it’s getting closer now.
Where did you find the 100 value? Tought the sensor was set default to 400…
Sensor supports wide range of frequencies, indeed. Hardware I2C on MCU can only do certain frequencies. 100 is a safe bet. With all address pins grounded 0x48 is the address you should use.
@ Architect - ok. I’ll take a note on 100 for future stuff. Thanks
I tried another sensor board this last time. Not what address it is set up with, but I somewhat get connected with 0x4B on this one. Guess it’s logical that every sensor on the computer have its own address.
I’ll dig some more and try and actually get a temperature reading. 0C seems a little cold for indoor, even tough it’s winter outside
I’d also suggest 0x48 and 0x49 are not the right addresses to look at. Remember, 100% of I2C issues we see here are people using the 8-bit address for a device when netmf needs the 7-bit address. (this one could be the exception ! ) The Arduino crowd usually quote the 8-bit address (and when you said 0x48 and 0x49, that’s usually a sign of this!)
You’ve found 0x4b which actually makes a lot of sense of being in the same address “family” of 0b1001 and different a0/a1/a2 lines; that’s a range of options of 0x48 to 0x4f.
@ Brett - that 7/8-bit address stuff clarifies a lot. If more then me have problems, and also this seems to be a common problem, maybe some more info to enlighten people should be added to the documentation.
Yes, the “confusion” is prevalent, but the problem is that although the original Phillips documentation calls out a 7-bit address, there are many other places that talk about the full 8-bit read or write addresses that won’t change their ways, will continue to litter the interwebs with their false information, and will make it hard for someone coming at this with not a huge amount of information to struggle, or worse follow the “trend” and be wrong as well. Yes, I’m pointing at you, Arduino. Seriously though, it’s hard to make sure everything talks about this correctly since different libraries use different “base” address (and in the case of Arduino, from what I understand, that’s not the defined-by-the-standard address) and the people using those libraries will only talk about the address in their own context.