From Analog Circuits: World Class Designs

Bonnie Baker

Note

Here Bonnie shows how a comparator and a few Rs and Cs can help a microcontroller make a surprisingly good Digital-to-Analog Converter (DAC) or a slow but simple ADC. /rap

In This Chapter

When you move your analog problem solving from hardware to firmware, a few useful processor or controller peripherals will take you a long way. These peripherals include the pulse width modulator (PWM), the comparator, a timer or two, and the I/O gates. Although all these peripherals sound like they are digital, we are going to use them to an analog advantage in our circuits.

The PWM might or might not be a part of your controller or processor arsenal. If the PWM function is an internal function from your digital chip manufacturer, you can use it to produce fairly accurate voltage references. If you don't have a PWM on board, you can generate the signal in firmware. The voltage source generated by this tool is as accurate as your on-board timer and power supply voltage. The only thing this voltage reference requires is a PWM generator and an analog filter.

You will find that there is probably an integrated comparator in your controller or processor. If not, an I/O gate can take over this function for some applications in which you are looking for a trigger or level indicator of an analog signal. I prefer working with a comparator because the threshold is usually more predictable than your run-of-the-mill digital I/O pins. You can design...

Copyright Elsevier Inc. 2008 under license agreement with Books24x7

Products & Services
Analog Comparators
Analog comparators are amplifiers that compare the magnitude of voltages at two inputs. An analog comparator is an operational amplifier with negative feedback removed, and with no feedback and very high gain, the output voltage goes to one extreme to the other.
Amplifier and Comparator Chips
Amplifier and comparator chips are board-level components for amplifying voltage, current, or power.
Counter and Timer Boards
Counter and timer boards are computer cards that perform digital counting and/or timing functions.
Microcontrollers (MCU)
Microcontrollers (MCU) are complete computer systems on a chip. They combine an arithmetic logic unit (ALU), memory, timer/counters, serial port, input/output (I/O) ports and a clock oscillator.

Topics of Interest

Robert A. Pease Note Well, I stated at the start of the story the reason it's important to do an error budget on even a simple circuit and then I showed the size of trouble you can get into if you...

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...

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...

Bonnie Baker In This Chapter The analog-to-digital converter (ADC) is always in the back seat of the station wagon, looking at the analog signal through the rear window. In a way, I am soft on this...

The PIC16C74 is one of the latest mid-range microcontrollers from Microchip Technology Inc. In this article we will be addressing a few of the new features and peripherals of this new part. The main...