Up until now we have only ever used digital information in our programs. Whilst we have used variables with a range of possible values; all the inputs and outputs have been either on or off. This is all that the smaller PIC microcontrollers can deal with. However, the PIC 16F88 processor is a bit cleverer. It can support 8 analogue input devices.

If your sensor produces a voltage or changes its electrical resistance in response to thing being measured you can now use your PIC microcontroller to get your programs to interact with things like temperatures, speeds and pressures.

The PIC microcontroller contains circuitry which will convert a voltage on one of the pins to a numeric value which represents it. The higher the voltage, the bigger the number that is supplied by the Analogue to Digital Converter (ADC) to your programs.

The input voltage can also be measured relative to a reference voltage which can be supplied by the PIC microcontroller itself, so that you can make quite accurate measurements. The converter inside the PIC microcontroller works to a resolution of 10 bits, i.e. the thing you are measuring will be represented by a number between 0 and 2 to the power 10, or 1024. Remember that the PIC microcontroller itself likes to work on values which are held in 8 bits, or between 0 and 255. Fortunately for us, the BoostC compiler is quite happy to work with 16 bit integers, so we can easily manipulate the values supplied by the converter.