5.7.3 Temperature Sensor
The PIC16F, PIC18F and PIC32CM MCUs provide an integrated temperature sensor for on-chip temperature monitoring, typically accessible through the ADC. The calibration data is stored in nonvolatile memory to improve measurement accuracy and software compensation for precise readings. These sensors are used for thermal management, diagnostics, and temperature compensation in embedded systems. The following table provides a comparison of temperature sensor features of the PIC16F, PIC18F and PIC32CM.
| Feature | PIC16F Temp Sensor | PIC18F Temp Sensor | PIC32CM Temp Sensor |
|---|---|---|---|
| Integration/Sensor Access | Integrated into FVR and accessed through ADC (dedicated channel) | Integrated into FVR and accessed through ADC (dedicated channel) |
Varies per device family: Integrated into ADC (dedicated channel) Stand-alone Temperature Sensor (TSENS) peripheral |
| Calibration Data Location | Device Information Area (DIA) | Device Information Area (DIA) | NVM |
| Temperature Range | -40°C to +85/125°C (typical) | -40°C to +85/125°C (typical) | -40°C to +125°C (typical) |
| Accuracy (typical) | ±5°C to ±10°C (uncalibrated) | ±5°C to ±10°C (uncalibrated) |
ADC: ±2°C to ±5°C (uncalibrated) Improved with calibration TSENS: ±1°C to ±2°C (with calibration) |
| Software Compensation | ADC: Required for high accuracy | ADC: Required for high accuracy | ADC: Required for high accuracy TSENS: Minimal |
| Sensor Output Type | Analog voltage (ADC input) | Analog voltage (ADC input) | Analog voltage (ADC input) |
| Interrupt/ Threshold Support | Software-monitoring only | Software-monitoring only | Supported |
