5.2. PIC16 C Temperature Controller

• Basic system

• Software design

• Implementation

In this section, the software design principles just outlined are applied to a typical application, a temperature control system. The schematic of the demo hardware is shown in Figure 5.2. The TEMP pot represents a temperature sensor that outputs a voltage of 0–5 V. If a scaling of 100 mV/°C is assumed, the range is 0–50°C, with 2.5 V representing 25°C.

Figure 5.2. Temperature Control System

System Operation

The sensor is connected to AN1, the ADC channel 1. A SET pot provides the reference temperature for the system. If the measured temperature is below the set ...

Get Programming 8-bit PIC Microcontrollers in C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.