công cụ tìm kiếm bảng dữ liệu linh kiện điện tử
  Vietnamese  ▼
ALLDATASHEET.VN

X  

ADT7302ARMZ bảng dữ liệu(PDF) 13 Page - Analog Devices

tên linh kiện ADT7302ARMZ
Giải thích chi tiết về linh kiện  짹2 C Accurate, Micropower Digital Temperature Sensor
PDF  16 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
nhà sản xuất  AD [Analog Devices]
Trang chủ  http://www.analog.com
Logo AD - Analog Devices

ADT7302ARMZ bảng dữ liệu(HTML) 13 Page - Analog Devices

Back Button ADT7302ARMZ Datasheet HTML 8Page - Analog Devices ADT7302ARMZ Datasheet HTML 9Page - Analog Devices ADT7302ARMZ Datasheet HTML 10Page - Analog Devices ADT7302ARMZ Datasheet HTML 11Page - Analog Devices ADT7302ARMZ Datasheet HTML 12Page - Analog Devices ADT7302ARMZ Datasheet HTML 13Page - Analog Devices ADT7302ARMZ Datasheet HTML 14Page - Analog Devices ADT7302ARMZ Datasheet HTML 15Page - Analog Devices ADT7302ARMZ Datasheet HTML 16Page - Analog Devices  
Zoom Inzoom in Zoom Outzoom out
 13 / 16 page
background image
ADT7302
Rev. 0 | Page 13 of 16
The following software program shows how to program a
PIC16F873 to communicate with the ADT7302. The
PIC16F873 is configured as an SPI master with the PortA.1 pin
used as CS. 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);
//Pic is set up as Master device.
CKP = 1;
//Idle state of clock is high.
do{
delay_ms(10);
//Allow time for conversions.
Output_low(CS);
//Pull CS low.
delay_us(10);
//CS to SCLK setup time.
MSByte = SPI_Read(0);
//The first byte is clocked in.
LSByte = SPI_Read(0);
//The second byte is clocked in.
delay_us(10);
//SCLK to CS setup time.
Output_High(CS);
//Bring CS high.
ADC_Temp_Code = make16(MSByte,LSByte);
//16bit ADC code is stored ADC_Temp_Code.
ADC_Temp_Code_dec = (float)ADC_Temp_Code;
//Covert 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.
}
}while(True);
//Temperature value stored in TempVal.
}



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16


bảng dữ liệu tải về

Go To PDF Page


Link URL



Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không?  [ DONATE ] 

Alldatasheet là   |   Quảng cáo   |   Liên lạc với chúng tôi   |   Chính sách bảo mật   |   Liên kết đến bảng dữ liệu    |   Trao đổi link   |   Tìm kiếm theo nhà sản xuất
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