This application note describes how to implement an Analog-to-Digital (A/D) Converter function using a member of the PIC16C6XX series of microcontrollers. Although these microcontrollers do not have a built-in A/D Converter like other controllers from Microchip, the comparator function, internal voltage reference and timers can be used to digitize an analog signal.
Some of the standard PICmicros have a comparator module, consisting of two comparators, both of which can be connected to PORTA in a variety of configurations. The internal voltage reference divider can be used with the comparators to establish thresholds.
Additionally, one of the comparator inputs can be configured to the RA2 port allowing for the use of an external voltage reference. By combining these elements, a first order modulator and first order filter can be designed, emulating the function of an analog-to-digital delta-sigma conversion.
This method of conversion is quickly implemented in firmware with very few additional external components. Consequently, the cost of hardware implementation is minimal, particularly for such a high resolution converter solution. The input range is very flexible and adjusted with external resistors. Although this method is not particularly strong in terms of DC accuracy, it is well suited for ratiometic applications.
Source: BME
Authors: Dieter Peter | Bonnie C. Baker | Dan Butler | Hartono Darmawaskita | Microchip Technology Inc
>> Top Microcontroller Project Ideas for Students
>> 100+ Easy Electronics Projects for Engineering Students