Page 123 - Embedded Microprocessor Systems Real World Design
P. 123

(for a DAC) will be no better than the cumulative errors of the ADC/DAC,  the ref-
                 erence, and any analog amplification. Using 5 percent resistors in the front end
                will  completely defeat the purpose of having a 10-bit  ADC.
                   Even though the accuracy of  results is limited to accuracy of the components,
                you  can sometimes achieve better accuracy by  calibrating each system. An  ADC
                 system might be calibrated by driving the analog input with a known, precise voltage
                 and letting the microprocessor store a calibration constant that is used to correct
                 all future measurements. This sort of  calibration can compensate for part-to-part
                variations, but it won’t compensate for things like aging or temperature drift. And,
                 of course, this is an extra and possibly expensive manufacturing step.
                   To perform calibration, the system will need:
                  A means to input a calibration signal. This must be processed using all the same
                   parts that the system will use in normal operation (input amplifiers, filters, and
                   so on) to insure an accurate result.
                   Nonvolatile memory to store the calibration results.
                   Sufficient  processing  power  to  perform  the  required  correction  in  normal
                  operation.
                   Software for calibration. This can be permanently part of the operating software,
                   or  it  could  be  special  software  that  is  loaded  only  during  the  calibration
                   operation.
                   If field replacement of parts must be supported, there must be a means to cali-
                   brate field replacements before they are shipped or a means to calibrate them
                   in the field.
                   Of  course, calibration cannot  compensate for  temperature drift unless  it  is
                 performed  at various temperatures. In  addition, calibration cannot compensate
                 for EM1  or other  noise inputs that cannot be  duplicated during the  calibration
                 step.


                 Internal Analog-to-Dlgffal Converters

                 Many  microprocessors  include  an  internal  analog-todigital  converter.  The
                 Microchip PIC16C7x series is a typical example. The parts in this family have an
                 internal &bit  A/D converter. The parts have from four to eight analog inputs. There
                 is only one A/D  converter, but an internal analog multiplexer allows the A/D  con-
                 verter to process any of the inputs, one at a time. Any microprocessor design that
                 uses an A/D  converter, whether internal or external, must take into account some
                 considerations.
                   The Microchip A/D converter handles multiple inputs by selecting one at a time
                 under software control. Once an input is selected, a settling time must elapse before
                 the A/D  conversion can start. If  the conversion is started immediately, the result
                 will be incorrect. The software must take this delay into account.


                 Hardware Design 2                                                    105
   118   119   120   121   122   123   124   125   126   127   128