This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMP103EVM: Temperature data without USB

Part Number: TMP103EVM
Other Parts Discussed in Thread: TMP103

Hello,

I would like to obtain the temperture data from the EVM. I see that pin1 is SCL, pin 3 is SDA, pin 8 is ground and which pin is Vcc? I would like to Access the temperature data using the I2C protocol.

Sincerely,

Manoj.

  • Hello,

    Is it possible to Access only one temperature sensor out of the 8 sensors available?
  • Hi Manoj,

    Pin 6 of the SM-USB-DIG connector is Vcc.

    Each sensor has a unique I2C Address. Even if you connect all of them, you can interact with them individually. This would occur as usual for the I2C Standard. Multiple Device Access (MDA) is a special feature that we added on top of normal I2C behavior. You're not required to use it.

    If for some reason you don't want to connect all of the devices, you can remove the devices themselves or the series resistors that connect them to the bus. See schematic:
    www.ti.com/.../sbor013.pdf

    Thanks,
    Ren
  • Hello Ren,

    I have used the Driver functions from the TIDA 00217 example. Temp_I2C_Init() and Temp_Read() are the two functions which are used. I call the Temp_Read() in main(). But I get stuck in

    void Temp_I2C_Init(void){

    //configure eUSCI for I2C

    UCB0CTL1 |= UCSWRST; //Software reset enabled

    UCB0CTLW0 |= UCMODE_3 + UCMST + UCSYNC + UCTR; //I2C mode, Master mode, sync, transmitter

    UCB0CTLW0 |= UCSSEL_2; // SMCLK = 8MHz

    UCB0BRW = 30; // Baudrate = SMLK/40 = 200kHz

    UCB0I2CSA = TMP103_I2C_ADDR;

    UCB0CTL1 &= ~UCSWRST;

    }

    void Temp_Read(void){

    Temp_I2C_Init();

    UCB0CTL1 |= UCSWRST;

    UCB0CTLW1 = UCASTP_2; // generate STOP condition.

    UCB0TBCNT = 0x0001;

    UCB0CTL1 &= ~UCSWRST;

    UCB0CTL1 |= UCTXSTT + UCTR; // Start i2c write operation

    while(!(UCB0IFG & UCTXIFG0));

    UCB0TXBUF = TEMP_REG;

    while(!(UCB0IFG & UCBCNTIFG));

    UCB0CTL1 &= ~UCTR;

    UCB0CTL1 |= UCTXSTT; // Repeated start

    UCB0CTLW0 |= UCTXSTP; // Send stop after next RX byte

    while(!(UCB0IFG & UCRXIFG0));

    g_TempDataCel = UCB0RXBUF;

    while (!(UCB0IFG & UCSTPIFG)); // Ensure stop condition got sent

    UCB0CTL1 |= UCSWRST;

    g_TempDataFahr = (g_TempDataCel*9)/5.0+32;

    }

    When I debug this program, I get stuck in the following lines.

    UCB0CTL1 |= UCTXSTT + UCTR; // Start i2c write operation

    while(!(UCB0IFG & UCTXIFG0));

    I guess this means the sensors are not powered or the bus is not active?

    Sincerely,

    Manoj.

  • Sorry,

    I have connected the SCL and SDA wrongly. Now I am able to access the temperature values individually.

    Sincerely,
    Manoj.