数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

TMP05 数据表(PDF) 21 Page - Analog Devices

部件名 TMP05
功能描述  짹0.5째C Accurate PWM Temperature Sensor in 5-Lead SC-70
PDF  28 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  AD [Analog Devices]
网页  http://www.analog.com
标志 AD - Analog Devices

TMP05 数据表(HTML) 21 Page - Analog Devices

Back Button TMP05 Datasheet HTML 17Page - Analog Devices TMP05 Datasheet HTML 18Page - Analog Devices TMP05 Datasheet HTML 19Page - Analog Devices TMP05 Datasheet HTML 20Page - Analog Devices TMP05 Datasheet HTML 21Page - Analog Devices TMP05 Datasheet HTML 22Page - Analog Devices TMP05 Datasheet HTML 23Page - Analog Devices TMP05 Datasheet HTML 24Page - Analog Devices TMP05 Datasheet HTML 25Page - Analog Devices Next Button
Zoom Inzoom in Zoom Outzoom out
 21 / 28 page
background image
TMP05/TMP06
Rev. 0 | Page 21 of 28
#include <stdio.h>
#include <ADuC812.h>
//ADuC812 SFR definitions
void delay(int);
sbit Daisy_Start_Pulse = 0xB7;
//Daisy_Start_Pulse = P3.7
sbit P3_4 = 0xB4;
long temp_high0,temp_low0,temp_high1,temp_low1,temp_high2,th,tl; //Global variables to allow
//access during ISR.
//See Figure 32.
int timer0_count=0,timer1_count=0,tempsegment=0;
void int0 () interrupt 0
//INT0 Interrupt Service Routine
{
if (TR1 == 1)
{
th = TH1;
tl = TL1;
th = TH1;
//To avoid misreading timer
TL1 = 0;
TH1 = 0;
}
TR1=1;
//Start timer1 running, if not running
Already
if (tempsegment == 1)
{
temp_high0 = (TH0*0x100+TL0)+(timer0_count*65536);
//Convert to integer
TH0=0x00;
//Reset count
TL0=0x00;
timer0_count=0;
}
if (tempsegment == 2)
{
temp_low0 = (th*0x100+tl)+(timer1_count*65536);
//Convert to integer
temp_high1 = (TH0*0x100+TL0)+(timer0_count*65536);
//Convert to integer
TH0=0x00;
//Reset count
TL0=0x00;
timer0_count=0;
timer1_count=0;
}
if (tempsegment == 3)
{
temp_low1 = (th*0x100+tl)+(timer1_count*65536);
//Convert to integer
temp_high2 = (TH0*0x100+TL0)+(timer0_count*65536);
TH0=0x00;
//Reset count
TL0=0x00;
timer0_count=0;
timer1_count=0;
}
tempsegment++;
}
void timer0 () interrupt 1
{
timer0_count++;
//Keep a record of timer0 overflows
}
void timer1 () interrupt 3
{
timer1_count++;
//Keep a record of timer1 overflows



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com