Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

I2C & temperature sensor TCN75A


  • Please log in to reply
6 replies to this topic

#1 Peter Forstmeier

Peter Forstmeier

    Advanced Member

  • Members
  • PipPipPip
  • 53 posts

Posted 02 December 2013 - 02:25 PM

Hi List,

i made the mistake and follow an answered thread.

Here again.

I use the code from this thread:

 

http://forums.netdui...-sensor-tcn75a/

 

My wiring:

Vcc - 5V

Gnd -> Gnd

SDA -> A4

SCL -> A5

 

Can anybody explain my how to wire the PullUp Resistores as mentioned in the third post?

 

One more question,

In the code the address is set to 0x48, is this the default adress of the sensor, or how to set a address.

Thanks in advance

Peter



#2 GonzaloG

GonzaloG

    New Member

  • Members
  • Pip
  • 8 posts

Posted 02 December 2013 - 09:48 PM

Are you using a Netduino Plus 2? If so use the SDA and SCL pins instead of A4 and A5.

 

You need 2 resistors of 2k2 (one for each i2c line) between the I2C line and 3v3. The I2C lines (SDA, SCL) are open drain on the Netduino. this means that the netduino will drive them to ground (0 volts) when a logic 0 must be present on the line, but leave them on high impedance (like unconnected) when a logic 1 must be present on the line. By placing a 2k2 resistor between the line and 3v3 (pullup) you make sure that the voltage is close to 3v3 when the netduino pin is in high impedance state, and understood as a logic 1 by the slave i2c devices. I2C addresses cannot be set by programming. I2C addresses are 7bit long. In some devices like timers, are totally fixed by the manufacturer and cannot be modified (refer to chip manufacturer for details). In others, the least significant bits (LSB) of the address are set by putting the corresponding chip pins to logic 0 or logic 1 (again refer to chip manufacturer). In the first case, you can only have 1 slave per I2C bus, in the second case you can have n^2 chips per bus, being n the number of address bits you can set by wiring the pins of the chip.



#3 GonzaloG

GonzaloG

    New Member

  • Members
  • Pip
  • 8 posts

Posted 02 December 2013 - 09:58 PM

In the TCN75A chip the addresses are of the form 1001xxx, being the 3 x the logic value of the lines a2, a1 and a0 (3 bits). so you can have 8 chips like this wired on the same bus with addresses from 0x48 to 0x4F. Make sure to wire pins a2, a1 and a0 to ground to make this pins be at logic 0 state so the address is 0x48.



#4 Peter Forstmeier

Peter Forstmeier

    Advanced Member

  • Members
  • PipPipPip
  • 53 posts

Posted 03 December 2013 - 05:52 PM

Hi,

at first thanks for the answers, hopefully tomorrow i will have time to test them out because im very busy in my Job.

I use the Netduino Plus 2, so i will change my wiring.

One more question arises,

What's about the address of the TCN75A if a2,a1,a0 i are 'open' means  not connected to ground.

This would be the easiest for me because i can't solder and these is the state i got them from the supplier.

 

Thanks in advance

Peter



#5 GonzaloG

GonzaloG

    New Member

  • Members
  • Pip
  • 8 posts

Posted 03 December 2013 - 09:50 PM

The answer to your question is on page 1 of the datasheet http://ww1.microchip...eDoc/21935D.pdf ;-)

#6 Peter Forstmeier

Peter Forstmeier

    Advanced Member

  • Members
  • PipPipPip
  • 53 posts

Posted 04 December 2013 - 01:30 PM

Hi,

please excuse my ignoranze but i'm a total noop in electrics.

 

My main job is on the  construction site (Roofing ans Sheetmetal) and in my freetime i'm here:

http://www.icsharpco...SD/Default.aspx

 

So, please be patient

Peter



#7 Peter Forstmeier

Peter Forstmeier

    Advanced Member

  • Members
  • PipPipPip
  • 53 posts

Posted 07 December 2013 - 06:28 PM

Hi,

i got it to work.

But, Setting Pinn A2,A1,A0 to ground leads to 'Can't deploy..........'.

leaving them open it works.

Thanks a lot

Peter






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.