Searching \ for 'Interfacing to Analog Devices TMP04 temperature se' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/io/sensors.htm?key=temperature
Search entire site for: 'Interfacing to Analog Devices TMP04 temperature se'.

Truncated match.
PICList Thread
'Interfacing to Analog Devices TMP04 temperature se'
1997\05\16@145119 by Carlton Haycock

picon face
I am relatively new to PIC's.  Using a part like the PIC16C84, what would be
the most straight forward way to interface to the TMP04 temperature sensor?
The TMP04 is a 3-wire device (+5v,gnd,data_out).  The temperature is encoded
using ratiometric encoding.  Basically what is done is that the data_out line
is held high for a certain period of time (T1) and held low for a certain
period of time (T2) and this repeats, over and over.  To read the
temperature, you
measure the times T1 & T2 and plug them into the following formula:

F degrees = 455 - ((T1*720)/T2) (if memory serves....)

Anyway, I need to find the least complicated scheme to measure the two times
T1 and T2.  I have looked at the sensor on a scope and manually calculated the
temperature and it was very close.  The average timing is 35hz, so it is not
very high speed.

Thanks in advance for any help,
Carlton

1997\05\16@200807 by Gerhard Fiedler

picon face
At 14:46 16/05/97 -0400, Carlton Haycock wrote:
>I am relatively new to PIC's.  Using a part like the PIC16C84, what would be
>the most straight forward way to interface to the TMP04 temperature sensor?
>The TMP04 is a 3-wire device (+5v,gnd,data_out).  The temperature is encoded
>using ratiometric encoding.  Basically what is done is that the data_out line
>is held high for a certain period of time (T1) and held low for a certain
>period of time (T2) and this repeats, over and over.  To read the
>temperature, you
>measure the times T1 & T2 and plug them into the following formula:
>
>F degrees = 455 - ((T1*720)/T2) (if memory serves....)
>
>Anyway, I need to find the least complicated scheme to measure the two times
>T1 and T2.  I have looked at the sensor on a scope and manually calculated
the
>temperature and it was very close.  The average timing is 35hz, so it is not
>very high speed.

Since the c/f84 don't have any fancy timer stuff, but have these
interrupt-on-change port b (bits 4..7), I'd probably put it on one of these
and on interrupt read the timer value. (You have to make sure that you take
care of the timer overflows: either handle them in a timer ov interrupt
routine, effectively creating a 16bit timer, or make sure the timer runs
slow enough to not overflow twice between two port interrupts.) The rest is
simple math, it seems.

(I have only _very_ limited and still mostly theoretical PIC knowledge... :-)

1997\05\17@051341 by Kalle Pihlajasaari

flavicon
face
Hi Gerhard, Carlton,

> At 14:46 16/05/97 -0400, Carlton Haycock wrote:
> >I am relatively new to PIC's.  Using a part like the PIC16C84, what would be
> >the most straight forward way to interface to the TMP04 temperature sensor?
> >The TMP04 is a 3-wire device (+5v,gnd,data_out).  The temperature is encoded

Or you can just sample the OP of the TMP03/4 and count the number of
highs in one register pai and lows in another, keep at it until one register
hits say 4096 or some other comfy number and then you have the ratio
as a function of 4096 in the other register.  This method introduces jitter
but does not require any timing, just sort of regular polling of the
device and a long period to average out the jitter caused by the
non synchronous sampling a bit.

You can look at some examples in PC PASCAL and STAMPII BASIC on my projects
page.

  http://www.ip.co.za/people/kalle/project.htm#heat

There may be a 's' on projects.

Cheers
--
Kalle Pihlajasaari   spam_OUTkalleTakeThisOuTspamip.co.za   http://www.ip.co.za/ip
Interface Products   P O Box 15775, DOORNFONTEIN, 2028, South Africa
+ 27 (11) 402-7750   Fax: 402-7751    http://www.ip.co.za/people/kalle

DonTronics, Silicon Studio and Wirz Electronics uP Product Dealer

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...