temperature_tc77

temp_TC77

Author Eur van Andel, eur@fiwihex.nl Copyright (c) 2010
Adapted-by
Compiler =2.4h

Description

this library reads the TC77 temperature sensor from Microchip.
The TC77 has a 12-bit plus sign temperature resolution of 0.0625°C 
per Least Significant Bit (LSb). It works via the SPI protocol
Specs:
1C (max.) accuracy from +25°C to +65C, 
2C (max.) accuracy from -40°C to +85C 
3C (max.) accuracy from -55°C to +125C 
2.7V to 5.5V Operating Range, Low Power: 250uA (typ.) Continuous Conversion
Mode, 0.1uA (typ.) Shutdown Mode 


--------   
I have several years of experience with hundreds of these sensors.
They work very well: fast, good accuracy, good repeatability. 
If they have an offset, it can easily be calibrated in software. 
The hard part of using this sensor is gettting it watertigtht. 
It is SMD, so it needs a PCB, and a cable. Dipping in resin or shrinking in
glue-covered shrinktube works. 
The SPI protocol is bit-banged here and can be used with any pins.
Clock data in on rising edge of clock, program must pull CS low. This allows
for multiple TC77s on the same 2-wire databus. Put a 100nF decoupling 
capacitor close the the TC77. If you don't, you WILL get weird data. 
Writing the status_word is not supported here.


Notes

This library expects two pins defined as SIO and SCK:
var bit SCK is pin_xx = high  -- TC77 common clock
pin_xx_direction = output
var bit SIO is pin_yy         -- TC77 common data
pin_yy_direction = input      
include temperature_tc77      -- this library 
A third pin is needed for /CS:
var bit cs is pin_zz = high  -- chipselect TC77 sensor
pin_zz_direction = output
Usage is:
  CS = low
  tc77_read_celsius_sword(T1)
  CS = high
Multiple TC77s can share the same bus, but each needs its own /CS pin. 


Dependencies


Summary

Global variables/contants

Procedures

Functions


API details

Global variables/contants

Procedures

Functions


Related samples

Here are the list of samples which use this library:

12hv61512hv615_temperature_fan.jal
16f876a16f876a_tc77.jal