PDA

View Full Version : Temperature sensing PIC16 and PIC12 chips



ScaleRobotics
- 19th December 2010, 21:39
Hey, did anyone notice that some of the newer PIC16F1xxx and PIC12F1xxx chips (like the PIC12F1822 ) have a temp sensor on their die!? Just noticed it today. Kind of cool I think. Not very precise, but maybe with a little oversampling it could get interesting.

5023

The on-board temperature indicator can be used to
measure the device temperature, which will
correspond to the temperature in its environment with
some delay. The indicator is measured using the ADC
and can be used uncalibrated for coarse temperature
measurements. For more precise temperature
measurements, calibration is required to account for
device parameter variation. Depending on the
application, calibration measurements at one or two
temperatures may be required. Since the ADC results
are dependent on its provided references, the fixed
references need to be supplied either by using the
onboard fixed references, or by using a regulated
supply. Otherwise, the device supply voltage must be
calculated using the fixed voltage reference.
5025

Charles Linquis
- 19th December 2010, 22:31
Kinda neat, but not accurate enough for real uses.

ScaleRobotics
- 19th December 2010, 22:54
Kinda neat, but not accurate enough for real uses.

Yes, definately better to buy a sensor if you need to be anywhere close to accurate. But still, might be useful for some general temps, like my project box is overheating ... etc.



5026

thitronic
- 1st November 2016, 18:59
How do I set this up. I am using PIC12f1501, however I am unable to access the temp module...no matter how much hot air I blow on the chip the ADCIN do not change. Please part of my program below:

ADCON0 = %00001111
FVRCON.5 = 1
FVRCON.4 = 1
ADCON0 = %01110111
adcin 29, temp
IF TEMP > 600 THEN
LOW PORTA.2

richard
- 2nd November 2016, 04:47
How do I set this up. I am using PIC12f1501

where is the rest of the adc module setup

ADC_CLOCK = ?
ADC_BITS = ?
ADC_SAMPLEUS =?
Right-Justify ?

OSC = ?
vcc= ? volts
temp is defined as a ? word/byte


it all matters



ADCON0 = %00001111 ; what do you expect from this
FVRCON.5 = 1
FVRCON.4 = 1
ADCON0 = %01110111 ; or this
adcin 29, temp
IF TEMP > 600 THEN
LOW PORTA.2