13/12/2014 Using TC74 (Microchip) thermal sensor for temperature measurement | Embedded Lab http://embeddedlab.com/blog/?p=3146 1/13 Embedded Lab An online teaching laboratory for Microcontrollers and Embedded Systems USING TC74 (MICROCHIP) THERMAL SENSOR FOR TEMPERATURE MEASUREMENT Posted on July 17, 2011 by R-B 19 comments | The TC74 chip is a serially accessible, digital temperature sensor from Microchip Technology that acquires and converts temperature information from its onboard solid-state sensor with a resolution of 1°C. The temperature is available as an 8-bit digital word stored in its internal temperature register, which is accessible through a 2-wire I2C compatible serial bus. This tutorial describes how to use the TC74 sensor with a PIC microcontroller to measure the surrounding temperature. Using TC74 sensor for temperature measurement Theory The TC74 digital temperature sensor is available in SOT-23 and TO-220 packages. The communication with the device is accomplished via a 2-wire I2C compatible serial bus. Temperature resolution is 1°C and conversion rate is SUBSCRIBE Fo Read Our Privacy Policy! Subscribe through email Sign Up EASY PULSE SENSOR Easy Pulse Sensor is designed for hobby and educational applications to illustrate the principle of finger photoplethysmography HOME NETDUINO CHIPKIT PRODUCTS STM32 TIPS AND TRICKS THEORY PIC PROJECTS PIC TUTORIALS AVR XMEGA ARDUINO PROJECTS CONTACT US Search...
Serial communication introduction - using TC74 thermal sensor from microchip
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
13/12/2014 Using TC74 (Microchip) thermal sensor for temperature measurement | Embedded Lab
http://embeddedlab.com/blog/?p=3146 1/13
Embedded LabAn online teaching laboratory for Microcontrollers and Embedded Systems
USING TC74 (MICROCHIP) THERMALSENSOR FOR TEMPERATUREMEASUREMENT
Posted on July 17, 2011 by R-B 19 comments |
The TC74 chip is a serially accessible, digital
temperature sensor from Microchip Technology that
acquires and converts temperature information from its
onboard solid-state sensor with a resolution of 1°C. The
temperature is available as an 8-bit digital word stored in
its internal temperature register, which is accessible
through a 2-wire I2C compatible serial bus. This tutorial
describes how to use the TC74 sensor with a PIC
microcontroller to measure the surrounding temperature.
Using TC74 sensor for temperature measurement
Theory
The TC74 digital temperature sensor is available in SOT-23
and TO-220 packages. The communication with the device
is accomplished via a 2-wire I2C compatible serial
bus. Temperature resolution is 1°C and conversion rate is
SUBSCRIBE
Follow
Read Our PrivacyPolicy!
Subscribe throughemail
Sign Up
EASY PULSE SENSOR
Easy Pulse Sensor isdesigned for hobby andeducationalapplications toillustrate the principleof fingerphotoplethysmography
HOME NETDUINO CHIPKIT PRODUCTS STM32 TIPS AND TRICKS THEORY PIC PROJECTS
PIC TUTORIALS AVR XMEGA ARDUINO PROJECTS CONTACT US
13/12/2014 Using TC74 (Microchip) thermal sensor for temperature measurement | Embedded Lab
http://embeddedlab.com/blog/?p=3146 2/13
a nominal 8 samples/sec. The pin diagram of TC74 chip is
shown below for reference.
Pin diagram of TC74
The TC74 stores the measured temperature into its 8-bit
internal register as 2′s complement binary format. The
most significant bit is the sign bit, which is set to 1 for
negative temperatures. Therefore, the maximum
measurable positive temperature is + 127 °C (0111 1111).
The TC74 has also got another 8-bit Read/Write
Configuration Register (RWCR) that is used to put the
device into a low power (I = 5 µA, typical) Standby mode.
In this mode, the A/D converter is halted and the
temperature data registers are frozen. Bit 7 of RWCR must
be set to put TC74 into Standby mode.
Temperature conversion table and internal registers
Serial port operation
The Serial Clock input (SCLK) and bidirectional data port
(SDA) form a 2-wire bidirectional serial port for
communicating with the TC74. The port is I2C compatible
(PPG) as a non-invasivetechnique for detectingcardio-vascular pulsewave. Read More ...
US customers buy here
Internationalcustomers buy here
SERIAL 7-SEGMENT LEDDISPLAYS
7-segment LED displaysare fun way ofdisplaying numericsensor readings inArduino or any othermicrocontroller-basedprojects. The downsideis they are resourcehungry and requireslots of I/O pins and CPUtime for continuouslydisplaying the readings.We have designedvarieties of 7-segmentdisplays that supportSPI interface and allowsyou an easy control ofevery LED segmentsusing only 3 I/O pins ofyour MCU.
13/12/2014 Using TC74 (Microchip) thermal sensor for temperature measurement | Embedded Lab
http://embeddedlab.com/blog/?p=3146 8/13
Embedded Labs Embedded Lessons PIC18F
Tips and Tricks
shab132
Konstantin
Ehsan
sensor, PIC18F2550, TC74
19 COMMENTS
November 10, 2014 4:49 am
hello, nice to meet you, i have tried the code and but isgiven me error that the device not found. And can i usedPIC 16f877A for the same code? thanks.
Reply
August 13, 2014 5:14 am
Hi! I tried to implement your circuit in Proteus by means ofsource and cof/hex files you provide for downloading.Unfortunately, it doesn’t work. The code hangs whileattempting to execute I2C1_Start in check_device function.Could you possibly explain why?Also, is it a good idea to place I2C1_Stop at the very end ofRead_Temp function?Thank you in advance!
Reply
December 19, 2012 1:27 pm
HiThank you about your excellent website.it’s very useful
This project was very useful for me but your program has atiny problem :in the “” read_temp “” function after you got the result ,you must stop the i2c with i2c_stop(); if you don’t do it,yourprogram (after going in this function for the first time)can’t use the i2c protocol again.you can repair it by stepsbelow :1) at the program (wich shown in the site) where function“unsigned short Read_Temp(){ ” is developed
2)after result = I2C1_Rd(u);and before return result;
3) add I2C1_stop();
thank you for your site.I’ll be happy to answer me by e_mail
13/12/2014 Using TC74 (Microchip) thermal sensor for temperature measurement | Embedded Lab
http://embeddedlab.com/blog/?p=3146 9/13
Konstantin
Konstantin
johnsan
Johnsan
Johnsan
R-B
Davide
August 13, 2014 10:33 am
Hi! Thank you for your reply. I am not trying to say thatthe code is wrong or anything like that. Obviously, Imiss subtle details. However, I still can’t run thesimulation in Proteus.Please, help if possible. I could send you the Proteusproject if it is necessary.Regards, [email protected]
Reply
August 22, 2014 5:11 am
Hi! I dealt with the problem. In Proteusenvironment, the pull-up resistors’ properties mustbe set to digital. The code works great!Regards!
Reply
October 23, 2012 3:48 am
hello..could we use LM35 as a replacement for TC74?
Reply
October 23, 2012 1:32 am
can the tc74 be replaced with lm35?
Reply
October 22, 2012 12:21 pm
hello,,good day.will the project still work the same if we will use TC74-5.0VCTTR instead of VAT?
Reply
October 22, 2012 1:38 pm
It should work. You may have to change the I2Caddress (const int TC74A0 = 0×90;) in the code to matchwith the correct device. See the datasheet page 9 formore details.
Reply
March 1, 2012 11:49 am
Hi,
I’m making a project with this sensor; I’ve got an A0 type.
unsigned char result;StartI2C(); // Issue start signal
WriteI2C(0×90); // Address + Write bit
WriteI2C(0×00); // Read TempRestartI2C(); // Issue start signal
WriteI2C(0×91); // Address + Read bit
result = ReadI2C();
return result;}
I hope you can help me, ThankYoup.s. I’m sorry for my english..
Reply
March 4, 2012 3:34 am
If you are using A0 type, my code should work. Makesure you connected the I2C pins of PIC18F4620correctly.
Reply
January 31, 2012 12:35 pm
That’s great! Thank you for the prompt help.
Kind regards,Miklos
Reply
January 30, 2012 10:15 am
Hi,
I’m a newbee for uControllers and unfortunately I haveonly a TC74A2 5.0VAT sensor. Which part of the originalprogram do I have to modify for the proper functionality.
13/12/2014 Using TC74 (Microchip) thermal sensor for temperature measurement | Embedded Lab
http://embeddedlab.com/blog/?p=3146 11/13
R-B
Michael Havenga
Michael Havenga
Miklos
Reply
January 30, 2012 6:20 pm
@Miklos,The I2C slave address of TC74A2 5.0VAT is 0×92. So youneed to change it in the following line of the code:const int TC74A0 = 0×90;Replace 0×90 by 0×92, and it should work.
Reply
November 2, 2011 3:36 am
Good day,
I am enjoying working with this project, but I would like tobe able to do a conditional operator to set a temperaturepoint where something happens:
Psuedo
When temp >= 28′C then print additional message to LCD;When temp >= 28′C then set port to start fan;
Simple, yes but I can’t figure out how to work with tha datatypes. If I convert temperture to int then it stays at a valueof 36.
If I just fo a conditional operator ie:
void checktemp(){
if (temperature >=28) Lcd_Out(2,6,”T HIGH!”);
}
Then when the temp on the display is no where near28and the additional message is already typed. Any helpplease, it would be greatly appreciated.
Regards
Michael
PS: I am in the process of converting to 3v3 uMicro. So Iwill let you know how the project works on low voltage Jtype PICs.
Reply
October 31, 2011 6:25 am
Hi,
Thanks for the great project, got it working. I was howeverperplexed by a problem I first experienced when trying toget the code to work on a PIC16F887 – I might be mising
13/12/2014 Using TC74 (Microchip) thermal sensor for temperature measurement | Embedded Lab
http://embeddedlab.com/blog/?p=3146 12/13
Michael
somthing but as far as I could tell the I2C capability of the
the 16F887 and the PIC18F2550 were the same.Interestingly, the 16F887 kept gettting the device not founderror wheres the PIC18f2550 worked first time … weird.
Regards
Michael
Reply
September 21, 2011 5:34 am
Hi,
Has this been tested on SMBUS – I would like to use this isin a 3v3 application ?
Regards
Michael
Reply
Pingback: I liked this: How to use Microchip’s TC74 sensorfor temperature measurement | Road to 2012
Pingback: Electronics-Lab.com Blog » Blog Archive » How touse Microchip’s TC74 sensor for temperaturemeasurement
LEAVE A REPLY
Your email address will not be published. Required fieldsare marked *