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.

TMP117EVM: need programming guide to create Windows C# app to read temperatures from the EVM

Part Number: TMP117EVM
Other Parts Discussed in Thread: TMP117, MSP430F5528, ENERGIA

We want to make a Windows app that reads temperatures from the TMP117EVM.

Is there a TMP117EVM programming guide?

Is there a software library for .NET with sensor_write() and sensor_read() functions for TMP117EVM ?

We want to make a .NET C# or VB app but need a library that has the sensor_write() and sensor_read() functions in the .c and .h files generated by the TMP117EVM GUI Code Generator.

  • Hi Doug,

    The Code Generator code is not intended to be used with the TMP117EVM. It is intended to help customers get started with their firmware development. The TMP117EVM GUI Code Generator has been superseded by ASCStudio. https://dev.ti.com/sysconfig/index.html?product=ascstudio&module=/ti/sensors/tempsensor/TMP117

    TI does not support the use of TMP117EVM with other software. The purpose of the TMP117EVM is to evaluate the TMP117 device using the GUI Composer software provided.

    thanks,

    ren

  • Thanks, ren.  Are you saying the *only* way to get real time temperatures from TMP117 chip is to have hardware that reads chip by I2C?

  • Doug,

    I consider the supplied GUI https://dev.ti.com/gallery/info/THSApps/TMP117EVM_GUI to be "real time," but I understand if it's not what you're looking for.

    To meet your stated goal of interfacing TMP117 with C#, you will have to bring your own USB-to-I2C hardware. It would be possible to write firmware for MSP430F5528 that meets your goals, and flash it to the TMP117EVM. The MSP430 debug interface is available at J4 header. We don't support using the EVM this way. We only support the supplied firmware interfacing with the supplied GUI. If you corrupt your EVM's firmware, and need to restore it, the file is here: e2e.ti.com/.../tmp117evm-firmware-txt-file-please-to-provide

    thanks for your understanding,

    ren

  • Hi, Ren.

    Is there a 3rd party that makes any device to interface between TMP117 I2C and Windows USB?

  • Hi Doug,

    The Aardvark from Total Phase has the best driver library that I've personally seen for USB-to-I2C hardware. It's possible that it is dated now. National Instruments sells hardware that we use in our labs, but it's not likely to be of interest to you. Since I2C is a bus that is used internally to a product or PCB, accessed by an embedded MCU, there aren't a lot of products in the market to interface I2C with Windows. The software, like our ASCStudio, is geared towards embedded applications. 

    There are a lot of Arduino-like products sold and lots of Arduino-like software projects available freely on the internet. These projects require that you prepare some firmware to perform the I2C transactions and pass the result upstream through a USB COM port. You can view the COM port with a terminal application, and send characters over the link interactively. Most programming languages are capable of accessing the COM port. This is the most straight-forward way of accomplishing your goal. As I alluded to previously, it is possible to write firmware that does this on the EVM hardware you have. The MSP430 would not be as user-friendly as Arduino and you would need to have a LaunchPad to connect to the EVM for flashing. 

    There are also single board computers like Beagle Bone and Raspberry Pi which run the Linux operating system while offering I2C. It would be possible to access linux utilities for I2C on a board like this. A typical desktop computer or laptop has I2C inside it that is not accessible, so running Linux there would not help you connect your TMP117. This would get you a low-cost desktop experience with I2C, just not in Windows.

    This is all the Arduino (or Energia) code needed to do what I'm describing:

    #include <Wire.h>
    
    void setup() {
      Wire.begin();
      Serial.begin(9600);
      Serial.println("My TMP117 USB Demo");
    }
    
    void loop() {
      Wire.beginTransmission(0x48);
      Wire.write(0); // write pointer 0 to TMP117
      Wire.endTransmission();
      Wire.requestFrom(0x48, 2);
      long bytes = Wire.read() << 8;
      bytes |= Wire.read();
      float celsius = bytes * 0.0078125;
      Serial.println(celsius);
      delay(1000);
    }

    The output produced on the COM port looks like this on a terminal:

    My TMP117 USB Demo
    24.02
    24.02
    24.02
    24.02
    24.02
    24.03
    24.03

    thanks,

    ren