3 Attachment(s)
Temperature sensing PIC16 and PIC12 chips
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.
Attachment 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.
Attachment 5025
Re: Temperature sensing PIC16 and PIC12 chips
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
Re: Temperature sensing PIC16 and PIC12 chips
Quote:
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
Code:
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