欢迎访问ic37.com |
会员登录 免费注册
发布采购

ADT7301 参数 Datasheet PDF下载

ADT7301图片预览
型号: ADT7301
PDF下载: 下载PDF文件 查看货源
内容描述: 13位温度 - 数字转换器A ???? 40A ° C至150A °C的工作温度范围内具有± 0.5A ℃的典型精度 [13-bit temperature-to-digital converter −40°C to 150°C operating temperature range ±0.5°C typical accuracy]
分类和应用: 转换器
文件页数/大小: 16 页 / 286 K
品牌: TI [ TEXAS INSTRUMENTS ]
 浏览型号ADT7301的Datasheet PDF文件第8页浏览型号ADT7301的Datasheet PDF文件第9页浏览型号ADT7301的Datasheet PDF文件第10页浏览型号ADT7301的Datasheet PDF文件第11页浏览型号ADT7301的Datasheet PDF文件第12页浏览型号ADT7301的Datasheet PDF文件第14页浏览型号ADT7301的Datasheet PDF文件第15页浏览型号ADT7301的Datasheet PDF文件第16页  
ADT7301  
The following software program shows how to program a  
PIC16F873 to communicate with the ADT7301. The  
PIC16F873 is configured as an SPI master with the Port A.1 pin  
CS  
used as . Any microchip microcontroller can use this  
program by simply exchanging the include file for the device  
that is being used.  
#include <16F873.h>  
#device adc = 8  
#use delay(clock = 4000000)  
#fuses NOWDT,XT, PUT, NOPROTECT, BROWNOUT, LVP  
#BIT CKP = 0x14.4  
#define CS PIN_A1  
void main(){  
int MSByte,LSByte;  
long int ADC_Temp_Code;  
float TempVal,ADC_Temp_Code_dec;  
setup_spi(spi_master);  
CKP = 1;  
//Pic is set up as master device.  
//Idle state of clock is high.  
do{  
delay_ms(10);  
//Allow time for conversions.  
Output_low(CS);  
//Pull CS low.  
delay_us(10);  
MSByte = SPI_Read(0);  
LSByte = SPI_Read(0);  
//CS to SCLK set-up time.  
//The first byte is clocked in.  
//The second byte is clocked in.  
delay_us(10);  
Output_High(CS);  
//SCLK to CS set-up time.  
//Bring CS high.  
ADC_Temp_Code = make16(MSByte,LSByte);  
ADC_Temp_Code_dec = (float)ADC_Temp_Code;  
//16 bit ADC code is stored ADC_Temp_Code.  
//Convert to float for division.  
if ((0x2000 & ADC_Temp_Code) == 0x2000)  
//Check sign bit for negative value.  
{
TempVal = (ADC_Temp_Code_dec - 16384)/32;  
//Conversion formula if negative temperature.  
}
else  
{
TempVal = (ADC_Temp_Code_dec/32);  
}
//Conversion formula if positive temperature.  
//Temperature value stored in TempVal.  
}while(True);  
}
Rev. B | Page 13 of 16  
 复制成功!