AN546
AN546 is Using the Analog to Digital Converter manufactured by Microchip Technology.
Authors:
..
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.
Using the Analog-to-Digital (A/D) Converter
Sumit Mitra, Stan D’Souza, and Russ Cooper Microchip Technology Inc.
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%.
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:
- monly used A/D terminology
- How to configure and use the PIC16C71 A/D
- Various ways to generate external reference voltage (VREF)
- Configuring the RA3:RA0 pins
Code Width
The distance (voltage differential) between two transition points is called the “Code Width.” Ideally the Code Width should be 1LSb (Figure 1).
MONLY 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.
FIGURE 1:
PIC16C7X IDEAL TRANSFER FUNCTION
FIGURE 2:
ALTERNATE TRANSFER FUNCTION
FFh FEh Digital code output
FFh FEh Digital code output 04h 03h 02h 01h 00h 256LSb (full scale) (full scale) 0.5LSb 1LSb 2LSb 3LSb 4LSb 255LSb 255LSb 256LSb 0.5LSb 1LSb 2LSb 3LSb...