TMP175 Temperature Sensor
Note
This page has been moved to the Components section of the website. Please see http://developer.mbed.org/components/TMP175-TMP75-Temperature-Sensor/ .
The TMP175 and TMP75 are two-wire, serial output temperature sensors available in SO-8 and MSOP-8 packages. Requiring no external components, the TMP175 and TMP75 are capable of reading temperatures with a resolution of 0.0625°C.
The TMP175 and TMP75 are specified for operation over a temperature range of –40°C to +125°C.
Features
- 27 ADDRESSES (TMP175)
- 8 ADDRESSES (TMP75)
- DIGITAL OUTPUT: Two-Wire Serial Interface
- RESOLUTION: 9- to 12-Bits, User-Selectable
- ACCURACY: ±.5°C (max) from –25°C to +85°C, ±2.0°C (max) from –40°C to +125°C
- WIDE SUPPLY RANGE: 2.7V to 5.5V
#include "mbed.h"
#include "TMP175.h"
DigitalOut myled(LED1);
TMP175 mySensor(p9,p10);// sda,scl
LocalFileSystem local("mbedMemory");
int main(){
char Fmt[100];
float Temp;
mySensor.vSetConfigurationTMP175(SHUTDOWN_MODE_OFF|COMPARATOR_MODE|POLARITY_0|FAULT_QUEUE_6|RESOLUTION_12,0x48); // Address -> A0,A1,A2=0
mySensor.vSetTemperatureLowTMP175(25.0);
mySensor.vSetTemperatureHighTMP175(35.0);
FILE *fp = fopen("/mbedMemory/TMP175Debug.txt", "w");
fprintf(fp, "TMP175/75 mbed NXP:\r\n");
for(int k=0;k<100;k++){
Temp=mySensor;
sprintf(&Fmt[0],"Temperature: %f ºC\r\n",Temp);
fprintf(fp,&Fmt[0]);
myled = 1;
wait(0.5);
myled = 0;
wait(0.5);
}
fclose(fp);
while(1);
}
Import programTMP175_Example
Example TMP175 Temperature Sensor
Library:
Import libraryTMP175
TMP175 Temperature Sensor
