Parameter Name Value
Typical Accuracy (°C) ±0.5
Max Input/Supply Current (µA) 350
Max Accuracy @ 25°C (°C) ±2
Temp. Range (°C) +125
Operating Voltage Range (V) +5.5
Device Description Serial Output Temp Sensor
Resolution (bits) 8
Pb Free Available Yes
Summary
TC74 is a serially accessible digital temperature sensor particularly suited for low cost and small form-factor applications. Temperature data is converted from the on-board thermal sensing element and made available as an 8-bit digital word. Communication with the TC74 is accomplished via a simple 2-wire SMBus/I2C™-compatible serial port. This bus also can be used to implement multi-drop/multi-zone monitoring. The SHDN bit in the CONFIG register can be used to activate the low-power Standby mode. Temperature resolution is 1°C. Conversion rate is a nominal 8 samples/sec. Power consumption in only 200 µA (5 µA Standby). Small size, low installed cost and ease of use make the TC74 an ideal choice for implementing thermal management in a variety of systems.
Features
Digital Temperature Sensing in SOT-23-5 Package
Outputs Temperature as an 8-Bit Digital Word
Simple Serial Port Interface
Solid State Temperature Sensing:
±2°C Accuracy from +25°C to +85°C
±3°C Accuracy from 0°C to +125°C
3.0, and 5.5V Operating Range
Low Power 200 µA Operating
5 µA Standby Mode
General Description
The TC74 is a serially accessible, digital temperature
sensor particularly suited for low cost and small formfactor
applications. Temperature data is converted from
the onboard thermal sensing element and made
available as an 8-bit digital word.
Communication with the TC74 is accomplished via a 2-
wire SMBus/I2C compatible serial port. This bus also
can be used to implement multi-drop/multi-zone
monitoring. The SHDN bit in the CONFIG register can
be used to activate the low power Standby mode.
Temperature resolution is 1°C. Conversion rate is a
nominal 8 samples/sec. During normal operation, the
quiescent current is 200 μA (typ). During standby
operation, the quiescent current is 5 μA (typ).
Small size, low installed cost and ease of use make the
TC74 an ideal choice for implementing thermal
management in a variety of systems.
Look in the TC74 datasheet at page # 6 section 3.1.2
[
The TC74 is internally programmed to have a default
SMBus/I2C address value of 1001 101b. Seven other
addresses are available by custom order (contact
Microchip Technology Inc.
]
Unless you have a custom version of the TC74, then your
control byte will always be $9A or 1001 1010
What happened to my b..?
The b in the control byte "1001 101b" is set or cleared for you by
PBP depending on whether you are writing to or reading from the
I2C device. You should always leave this bit clear, hence the
control byte is always $9A or 1001 1010 for the TC74.
Try this --
i2cwrite sda,scl,$9A,$1,[$80] ' Place sensor in stand-by mode
i2cread sda,scl,$9A,$0,[temp] ' Read temperature
Now place something hot or cold on the sensor. The value returned
in temp should never change. The TC74 is in stand-by mode.
Now try this --
i2cwrite sda,scl,$9A,$1,[$00] ' Place in normal operating mode
i2cread sda,scl,$9A,$0,[temp] ' Read temperature
Now the value returned in temp should change as the temperature
changes.
Here's some code to play with;
temp var byte
scl var portc.3
sda var portc.4
Main:
' $9A = Control + I2C device address. This remains constant for the TC74
' as indicated in the TC74 datasheet 1001 101b. The b bit is set by PBP
' depending on whether you are reading or writing to the I2C device.
' $0 or $1 = the I2C internal register address to read or write.
' Note: You can read from address $0 or $1, but only write to address $1.
' You cannot write to address $0 since this is the temperature register.
' The last byte is used to place the sensor in normal or stand-by mode.
' $00 = config sensor for normal operation.
' $80 = place sensor in stand-by mode.
' While in stand-by mode the temperature readings will never change
' since the TC74 is in low power stand-by.
' ** Comment out 1 line below to see the results of stand-by & normal modes **
i2cwrite sda,scl,$9A,$1,[$80] ' Place sensor in stand-by mode
' i2cwrite sda,scl,$9A,$1,[$00] ' Place sensor in normal operation mode
' $9A,$1,[temp] reads address $1 which is the internal config register.
i2cread sda,scl,$9A,$1,[temp] ' Read config byte register.
hserout ["Config = ",bin8 temp,13,10] ' Print config reg value.
' $9A,$0,[temp] reads the temperature register which is at address $0
i2cread sda,scl,$9A,$0,[temp] ' Read temperature
HSEROUT ["Temp = ",bin8 temp," & ",dec temp," deg C",13,10]
pause 500
goto main
I'm not a big fan of this sensor, but that should get you going....;o]
Regards,
-Bruce
te-n.com
http://www.rentron.com
Device: TC74: Serial Digital Thermal Sensor
Address Options: A0 = 1001 000
A1 = 1001 001
A2 = 1001 010
A3 = 1001 011
A4 = 1001 100
A5 = 1001 101 *
A6 = 1001 110
A7 = 1001 111
* Default Address
Output Voltage: 3.3 = Accuracy optimized for 3.3V
5.0 = Accuracy optimized for 5.0V
Operating Temperature: V = -40°C ≤ TA ≤ +125°C
Package: AT = TO-220-5
Examples:
a) TC74A0-3.3VAT: TO-220 Serial Digital Thermal Sensor
b) TC74A1-3.3VAT: TO-220 Serial Digital Thermal Sensor
c) TC74A2-3.3VAT: TO-220 Serial Digital Thermal Sensor
d) TC74A3-3.3VAT: TO-220 Serial Digital Thermal Sensor
e) TC74A4-3.3VAT: TO-220 Serial Digital Thermal Sensor
f) TC74A5-3.3VAT: TO-220 Serial Digital Thermal Sensor *
g) TC74A6-3.3VAT: TO-220 Serial Digital Thermal Sensor
h) TC74A7-3.3VAT: TO-220 Serial Digital Thermal Sensor
a) TC74A0-5.0VAT: TO-220 Serial Digital Thermal Sensor
b) TC74A1-5.0VAT: TO-220 Serial Digital Thermal Sensor
c) TC74A2-5.0VAT: TO-220 Serial Digital Thermal Sensor
d) TC74A3-5.0VAT: TO-220 Serial Digital Thermal Sensor
e) TC74A4-5.0VAT: TO-220 Serial Digital Thermal Sensor
f) TC74A5-5.0VAT: TO-220 Serial Digital Thermal Sensor *
g) TC74A6-5.0VAT: TO-220 Serial Digital Thermal Sensor
h) TC74A7-5.0VAT: TO-220 Serial Digital Thermal Sensor
* Default Address
una pregunta mas las lineas se conectan asi sin resistencias de por medio????
....
#define escribir_dispositivo 0b10010000 // ya que la capsula es TC74A0
#define leer_dispositivo 0b10010001 // ya que la capsula es TC74A0
....
void temperatura(){
i2c_start();
i2c_write(escribir_dispositivo);
i2c_write(0x00);
i2c_start();
i2c_write(leer_dispositivo);
tmp=i2c_read();
i2c_stop();
.........
I2Cwrite sda, scl, $90,[$00] '$90 porque equivale a 10010000 y $00 para apuntar al registro TEMP
'despues para saber que temperatura es seria
I2Cread sda, scl, $91,[vtemp] 'donde $91 es para leer ya que equivale a 10010001 y vtemp es para almacenar el valor del registro TEMP.
I2Cwrite sda, scl, $90,[$01] ' apuntamos al registro CONFIG
I2Cwrite sda, scl, $90,[$14] ' aqui configuramos el registro CONFIG con un valor HEX de 14 que es igual a 00010100 que nos da la configuarcion que queriamos.
I2Cwrite sda, scl, $90,[$11] ' apuntamos al registro Tset
I2Cwrite sda, scl, $90,[$11] ´apuntamos a Tset
I2Cwrite sda, scl, $90,[$19] ´ mandamos el MSB
I2Cwrite sda, scl, $90,[$00] ´ mandamos el LSB
I2Cwrite sda, scl, $90,[$01] ' apuntamos al registro CONFIG
pause 50
I2Cwrite sda, scl, $90,[$14]
I2Cwrite sda, scl, $90,[$01,14]
PD hay alguien ahi?? esto suena a monologo :D
SEROUT PTX,16468,["TEMP: ", DEC MSB,".",DEC LSB, 13]