Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Chapter 13 - More PIC Applications > 13.3. PIC C Programming - Pg. 304

304 Chapter 13 Vdd GP5 / T1CKI / OSC1 / CLKIN GP4 / AN3 / !T1G / OSC2 / CLKOUT GP3 / !MCLR / Vpp 1 2 3 4 8 7 6 5 Vss GP0 / AN0 / Cin+ GP1 / AN1 / Cin- / Vref GP2 /AN2 / T0CKI / INT / Cout Figure 13.10 12F675 pin-out minimum temperatures. The display digit selection can be reconfigured to use only one output, or binary coded decimal (BCD) displays used which need only four outputs each. The application then only needs 16 I/O pins. Operating data could be transferred via the serial interface if the display is omitted (RB1, RB2 and RB4). 13.2.2. 12F675 Temperature Controller The 10 and 12 series of PIC mini-chips offer a minimal set of features in eight-pin packages. The pin-out for the 12F675 illustrates the point (Figure 13.10). It can be configured with six plain digital I/O pins, but also offers two timers, an analogue comparator or four analogue input channels. The 12F629 is the same, except that it does not include the ADC and is therefore a little cheaper. An internal oscillator and in-circuit programming are also available. A temperature controller could be implemented using this chip if only two analogue inputs are used (Figure 13.11). It could operate with a fixed set temperature, or another analogue input could be used as a set temperature input. With no display, a dial on the set temperature pot may be useful. 13.3. PIC C Programming The 18 series are the most powerful of the 8-bit PIC microcontrollers. The group offers a large selection of different combinations of advanced 8-bit features, and the larger memory size means that `C' can be used for application programming, instead of assembler. The instruction set of 75 16-bit instructions is designed to support this option. New low-power consumption devices are being added to this range all the time. Temperature Sensors Set Temperature AN0 AN1 AN2 GP3 GP4 GP5 Heater Vent Fan Figure 13.11 12F675 temperature controller