參數(shù)資料
型號(hào): TMP04GBC
廠商: ANALOG DEVICES INC
元件分類: 溫度/濕度傳感器
英文描述: Serial Digital Output Thermometers
中文描述: DIGITAL TEMP SENSOR-SERIAL, 4Cel, RECTANGULAR, THROUGH HOLE MOUNT
封裝: 0.050 X 0.060 INCH, DIE-3
文件頁數(shù): 12/16頁
文件大?。?/td> 375K
代理商: TMP04GBC
TMP03/TMP04
REV. 0
–12–
Software for the interface is shown in Listing 1. The program
monitors the TMP04 output, and turns the counters on and off
to measure the duty cycle. The time that the output is high is
measured by Timer 0, and the time that the output is low is
measured by Timer 1. When the routine finishes, the results are
available in Special Function Registers (SFRs) 08AH through
08DH.
Listing 1. An 80C51 Software Routine for the TMP04
;
; Test of a TMP04 interface to the 8051,
; using timer 0 and timer 1 to measure the duty cycle
;
; This program has three steps:
; 1. Clear the timer registers, then wait for a low-to-
; high transition on input P1.0 (which is connected
; to the output of the TMP04).
; 2. When P1.0 goes high, timer 0 starts. The program
; then loops, testing P1.0.
; 3. When P1.0 goes low, timer 0 stops & timer 1 starts. The
; program loops until P1.0 goes low, when timer 1 stops
; and the TMP04’s T1 and T2 values are stored in Special
; Function registers 8AH through 8DH (TL0 through TH1).
;
;
; Primary controls
$MOD51
$TITLE(TMP04 Interface, Using T0 and T1)
$PAGEWIDTH(80)
$DEBUG
$OBJECT
;
; Variable declarations
;
PORT1
DATA
90H
;TCON
DATA
88H
;TMOD
DATA
89H
;TH0
DATA
8CH
;TH1
DATA
8DH
;TL0
DATA
8AH
;TL1
DATA
8BH
;
;
ORG
100H
;
READ_TMP04:
MOV
A,#00
MOV
TH0,A
MOV
TH1,A
MOV
TL0,A
MOV
TL1,A
WAIT_LO:
JB
PORT1.0,WAIT_LO
MOV
A,#11H
MOV
TMOD,A
WAIT_HI:
JNB
PORT1.0,WAIT_HI
;
;Timer 0 runs while TMP04 output is high
;
SETB
TCON.4
WAITTIMER0:
JB
PORT1.0,WAITTIMER0
CLR
TCON.4
;
;Timer 1 runs while TMP04 output is low
;
SETB
TCON.6
WAITTIMER1:
JNB
PORT1.0,WAITTIMER1
CLR
TCON.6
MOV
A,#0H
MOV
TMOD,A
RET
END
;SFR register for port 1
;timer control
;timer mode
;timer 0 hi byte
;timer 1 hi byte
;timer 0 lo byte
;timer 1 low byte
;arbitrary start
;clear the
; counters
; first
;
;
;wait for TMP04 output to go low
;get ready to start timer0
;wait for output to go high
;start timer 0
;shut off timer 0
;start timer 1
;stop timer 1
;get ready to disable timers
相關(guān)PDF資料
PDF描述
TMP03GBC Serial Digital Output Thermometers
TMP05BRTZ-REEL 【0.5∑C Accurate PWM Temperature Sensor in 5-Lead SC-70
TMP05BRTZ-REEL7 【0.5∑C Accurate PWM Temperature Sensor in 5-Lead SC-70
TMP06 【0.5∑C Accurate PWM Temperature Sensor in 5-Lead SC-70
TMP06AKS-500RL7 【0.5∑C Accurate PWM Temperature Sensor in 5-Lead SC-70
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
TMP04NT9 制造商:Analog Devices 功能描述:
TMP05 制造商:AD 制造商全稱:Analog Devices 功能描述:【0.5∑C Accurate PWM Temperature Sensor in 5-Lead SC-70
TMP057-059-32-36 制造商:TRANSCOM 制造商全稱:TRANSCOM 功能描述:5 W GaAs PA PCB Module for 5.8 GHz Application
TMP05AKS 制造商:Analog Devices 功能描述:TEMP SENSOR DGTL 5PIN SC-70 - Bulk
TMP05AKS-500RL7 制造商:Analog Devices 功能描述:Temp Sensor Digital 5-Pin SC-70 T/R 制造商:Analog Devices 功能描述:TEMP SENSOR DGTL 5PIN SC-70 - Tape and Reel