INTRODUCTION
This application note is intended for PIC16C7X users with some degree of familiarity with analog system design. The various sections discuss the following topics:
- Commonly used A/D terminology
- How to configure and use the PIC16C71 A/D
- Various ways to generate external reference voltage (V REF)
- Configuring the RA3:RA0 pins
-
COMMONLY USED A/D TERMINOLOGY
The Ideal Transfer Function
In an A/D converter, an analog voltage is mapped into an N-bit digital value. This mapping function is defined as the transfer function. An ideal transfer is one in which there are no errors or non-linearity. It describes the “ideal” or intended behavior of the A/D. Figure 1 shows the ideal transfer function for the PIC16C7X A/D.
Note that the digital output value is 00h for the analog input voltage range of 0 to 1LSb. In some converters, the first transition point is at 0.5LSb and not at 1LSb as shown in Figure 2. Either way, by knowing the transfer function the user can appropriately interpret the data.
Transition Point
The analog input voltage at which the digital output switches from one code to the next is called the “Transition Point.” The transition point is typically not a single threshold, but rather a small region of uncertainty (Figure 3). The transition point is therefore defined as
the statistical average of many conversions. Stated differently, it is the voltage input at which the uncertainty of the conversion is 50%.
Code Width
The distance (voltage differential) between two transition points is called the “Code Width.” Ideally the Code Width should be 1LSb (Figure 1).
The midpoint between two transition points is called the “
Reference:
- AN546, Microchip Technology Inc. Sumit Mitra, Stan D’Souza, and Russ Cooper,