DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

PIC18F46K80T-I/SP データシートの表示(PDF) - Microchip Technology

部品番号
コンポーネント説明
メーカー
PIC18F46K80T-I/SP Datasheet PDF : 623 Pages
First Prev 251 252 253 254 255 256 257 258 259 260 Next Last
PIC18F66K80 FAMILY
18.9 Measuring Temperature with the
CTMU Module
The CTMU, along with an internal diode, can be used
to measure the temperature. The A/D can be con-
nected to the internal diode and the CTMU module can
source the current to the diode. The A/D reading will
reflect the temperature. With the increase, the A/D
readings will go low. This can be used for low-cost
temperature measurement applications.
EXAMPLE 18-6: ROUTINE FOR TEMPERATURE MEASUREMENT USING INTERNAL DIODE
// Initialize CTMU
CTMUICON = 0x03;
CTMUCONHbits.CTMUEN = 1;
CTMUCONLbits.EDG1STAT = 1;
// Initialize ADC
ADCON0 = 0xE5;
ADCON1 = 0x00;
ADCON2 = 0xBE;
// Enable ADC and connect to Internal diode
//Right Justified
ADCON0bits.GO = 1;
while(ADCON0bits.G0);
Temp = ADRES;
// Start conversion
// Read ADC results (inversely proportional to temperature)
Note: The temperature diode is not calibrated or standardized; the user must calibrate the diode to their application.
2010-2012 Microchip Technology Inc.
DS39977F-page 251

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]