Example: bachelor of science

Make a Delta-Sigma Converter Using a …

1998 Microchip Technology 1 M AN700 INTRODUCTION This application note describes how to implement anAnalog-to-Digital (A/D) Converter function Using amember of the PIC16C6XX series of these microcontrollers do not have a built-inA/D Converter like other controllers from Microchip, thecomparator function, internal voltage reference and tim-ers can be used to digitize an analog signal. Some of the standard PICmicros have a comparatormodule, consisting of two comparators, both of whichcan be connected to PORTA in a variety of configura-tions.

AN700 DS00700A-page 2 1998 Microchip Technology Inc. This fundamental circuit concept has been used to gen-erate a large variety of the converters that provide high

Tags:

  Delta

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Make a Delta-Sigma Converter Using a …

1 1998 Microchip Technology 1 M AN700 INTRODUCTION This application note describes how to implement anAnalog-to-Digital (A/D) Converter function Using amember of the PIC16C6XX series of these microcontrollers do not have a built-inA/D Converter like other controllers from Microchip, thecomparator function, internal voltage reference and tim-ers can be used to digitize an analog signal. Some of the standard PICmicros have a comparatormodule, consisting of two comparators, both of whichcan be connected to PORTA in a variety of configura-tions.

2 The internal voltage reference divider can beused with the comparators to establish , one of the comparator inputs can be con-figured to the RA2 port allowing for the use of an exter-nal voltage reference. By combining these elements, afirst order modulator and first order filter can bedesigned, emulating the function of an analog-to-digitaldelta-sigma method of conversion is quickly implemented infirmware with very few additional external , the cost of hardware implementation isminimal, particularly for such a high resolution con-verter solution.

3 The input range is very flexible andadjusted with external resistors. Although this methodis not particularly strong in terms of DC accuracy, it iswell suited for ratiometic applications. Delta-Sigma THEORY The function of the classical Delta-Sigma Analog-to-Digital Converter is modeled with two circuit seg-ments; a modulator and a digital filter. The modulatorsection acquires an input signal as shown in Figure input signal is added to a signal from a Digital-toAnalog (D/A) Converter in the negative feedback differentiated signal then passes through an inte-grator and finally to one of the two inputs of a compar-ator.

4 The comparator acts like a one-bit quantitizer. Theoutput of the comparator is sent back to the differentia-tor via a one-bit Digital-to-Analog Converter . Addition-ally, the output of the comparator passes through adigital filter. With time, the output of the digital filter pro-vides a multi-bit conversion result. FIGURE 1: First Order Delta-Sigma A/D Converter Block : Dieter Peter Bonnie C. Baker Dan Butler Hartono DarmawaskitaMicrochip Technology InputMulti-BitDigital OutputDigital FilterComparatorDifferentiatorIntegrator 1-Bit D/A ConverterVREF+ + Make a Delta-Sigma Converter Using a Microcontroller s Analog Comparator Module AN700 DS00700A-page 2 1998 Microchip Technology Inc.

5 This fundamental circuit concept has been used to gen-erate a large variety of the converters that provide highresolution, relatively inexpensively. The next logicalstep for this type of A/D Converter is to move it into thecontroller. A basic controller is not able to execute thistype of function, however, a few additional peripheralsmake it possible. The circuit diagram for this type ofimplementation is shown in Figure 2. FIGURE 2: A microcontroller can be configured as aDelta-Sigma Converter with two additional externalresistors and one capacitor.

6 In this configuration, a lowpass filter is also implemented as part of the inputnetwork. In the circuit shown in Figure 2, the integrator functionof the Delta-Sigma function is implemented with anexternal capacitor, C INT . The absolute accuracy of thisexternal capacitor is not critical, only its stability fromintegration to integration, which occurs in a relativelyshort period of time. When RA3 of the PIC16C6XX isset high, the voltage at RA0 increases in occurs until the output of the comparator (C1 OUT)is triggered low.

7 At this point the driver to the RA3 out-put is switched from high to low. Once this hasoccurred, the voltage at the input to the comparator(RA0) decreases. This occurs until the comparator istripped high. At this point, RA3 is set high and the cyclerepeats. While the modulator section of this circuit iscycling, two counters are used to keep track of the timeand of the number of ones versus zeros that occur atthe output of the this circuit were compared to the classicalDelta-Sigma Converter , the integrator would be C INT.

8 The comparator is part of the controller, as well as itsvoltage reference. The one-bit D/A Converter is imple-mented in firmware by driving RA3 in accordance withthe output of the comparator (CMCON<6>). The firm-ware drives the D/A Converter output at RA3. The dig-ital filter is implemented with two counters. IMPLEMENTATION WITH THE CONTROLLER With the circuit in Figure 2, it is possible to conceptual-ize the Delta-Sigma function. The controller implemen-tation of this circuit is summarized in the flow chart inFigure 3. FIGURE 3: A Delta-Sigma A/D Conversion Flow Chartimplemented with circuit shown in Figure 2.

9 Care shouldbe taken to make the time required for every cycle takenthrough the flow chart to be a constant. This code isimplemented until a conversion is complete. Normally the output of the comparator is directly con-nected to RA3 which keeps the voltage at RA0 equal tothe reference voltage of the comparator in preparationfor the next function DeltaSigA2D (Appendix A) is called toperform a conversion, the result and counter variablesare cleared. Then the comparator is set to disconnectthe output from puts RA3 under active pro-gram control.

10 The comparator is checked at the beginning of eachloop. If the voltage on the capacitor is less than theinput voltage, RA3 is set high, which will put charge intothe capacitor raising the voltage. If the voltage on thecapacitor is greater than the input voltage, RA3 is setlow, taking charge out of the capacitor lowering thecapacitor voltage and the result register is continues as long as necessary to get the requiredresolution. For ten bits of resolution, 2 10 (1024) lapsthrough the loop are required.


Related search queries