tmp05art-reel7 Analog Devices, Inc., tmp05art-reel7 Datasheet - Page 21

no-image

tmp05art-reel7

Manufacturer Part Number
tmp05art-reel7
Description
?0.5?c Accurate Pwm Temperature Sensor In 5-lead Sc-70
Manufacturer
Analog Devices, Inc.
Datasheet
TMP05 Program Code Example 1
//=============================================================================================
// Description : This program reads the temperature from 2 daisy-chained TMP05 parts.
//
// This code runs on any standard 8052 part running at 11.0592MHz.
// If an alternative core frequency is used, the only change required is an
// adjustment of the baud rate timings.
//
// P3.2 = Daisy-chain output connected to INT0.
// P3.7 = Conversion control.
// Timer0 is used in gate mode to measure the high time.
// Timer1 is triggered on a high-to-low transition of INT0 and is used to measure
// the low time.
//=============================================================================================
IS TEMPSEGMENT
RESET TIMER 0
START TIMER 1
TEMP_HIGH0
CALCULATE
TO ZERO
= 1
YE S
NO
NO
COPY TIMER 1 VALUES
CHECK IF TIMER 1
IS TEMPSEGMENT
ENTER INTERRUPT
INTO A REGISTER
RESET TIMER 0
USING TIMER 1
USING TIMER 0
RESET TIMER 1
TEMP_HIGH1
TEMP_LOW0
CALCULATE
CALCULATE
IS RUNNING
TO ZERO
VALUES
VALUES
ROUTINE
Figure 36. ADuC812 Interrupt Routine Flowchart
= 2
YES
YES
Rev. B | Page 21 of 28
NO
IS TEMPSEGMENT
USING TIMER 0
TEMP_HIGH2
TEMP_LOW1
CALCULATE
CALCULATE
VALUES
= 3
YE S
NO
EXIT INTERRUPT
TEMPSEGMENT
INCREMENT
ROUTINE
TMP05/TMP06

Related parts for tmp05art-reel7