Introducing PORT A

PORT A is available on most PICs, starting from the 14 PIN devices. The reason why it may not be available on 8 PIN devices is that the 8 PINs have a GPIO (General Purpose I/O) system which is different from the rest of the family.

PORTA carries the analog to digital conversion inputs, along with digital I/O and other internal peripherals. The number of inputs is limited to the number of PINS on PORTA; on some larger devices for example the PIC16F887, PORTB also has analog inputs.

One key point to remember is that there is only one analog to digital converter which means that only one input can be read or sampled at a time. There is also a settling period between changing between inputs which must be allowed to pass before a sample can be read. This settling period is minimal, but can create inaccurate readings if the switching between channels is rapid.

The type of analog measurement is successive approximation, and you can read up more on the followin url: analog to digital conversion.

The analog to digital converter can measure from 0 to 5VDC, and voltage references can be used to calibrate / moderate the reading. The output from the A2D is delivered as a 10 BIT value which is stored in registers ADH and ADL. The 10 BIT value has to be orientated high or low between the two registers.

Reading or sampling the analog value can also be performed using a compiler which makes obtaining the value more easy.

Basic Circuit

The most common circuit is shown below. The voltage output is a function of the voltage applied across the sensor or the voltage divider circuit. If a sensor is used for example a LM 35, the relationship becomes a function of the sensors operation, which is relative to the input voltage.

VDIV

Uses

A2D has many uses and is found as a stable means of gaining measurements in industry and domestic applications.

[E]