• Channels
Part Inventory
Go
 
powered by:

 
  • Quick Poll
What Social Networking site do you use the most?



VOTE VIEW RESULTS
Previous Polls

Premium Content

New Signal Chain Technical Papers from Texas Instruments:

 

 

 

Create A D/A Output Using Two Pins On A PIC Micro


Contributing Author

June 18, 2001

Print
Reprints Comment Subscribe

With the addition of only a resistor and a capacitor, the low-cost eight-pin PIC12C671 can be used to provide an 8-bit digital-to-analog output (Fig. 1). Of course, this topology will work with almost any microprocessor that has an internal analog-to-digital (A/D) peripheral.

Following a simple concept, one of the microcontroller's A/D inputs monitors the voltage across an external capacitor (C1). Next, one of the digital I/O port pins pulls the voltage up or down (through R1) until it reaches the required value. When the digital I/O isn't being used to set the voltage on C1, it serves as a high-impedance input.

The flow diagram regulates the voltage across C1 at a rate of about 1 LSB per microsecond (Fig. 2). Therefore, C1 can be shifted (up or down) quickly enough to settle even a near-rail-to-rail output adjustment in about 20 ms. More clever algorithms, which match the pulse-adjustment time with the error, will obviously allow much faster convergence.

To view a sample code listing for the PIC12-C671, go to www.PlanetEE.com and click on "Ideas for Design."

With the addition of only a resistor and a capacitor, the low-cost eight-pin PIC12C671 can be used to provide an 8-bit digital-to-analog output (Fig. 1). Of course, this topology will work with almost any microprocessor that has an internal analog-to-digital (A/D) peripheral.

Following a simple concept, one of the microcontroller's A/D inputs monitors the voltage across an external capacitor (C1). Next, one of the digital I/O port pins pulls the voltage up or down (through R1) until it reaches the required value. When the digital I/O isn't being used to set the voltage on C1, it serves as a high-impedance input.

The flow diagram regulates the voltage across C1 at a rate of about 1 LSB per microsecond (Fig. 2). Therefore, C1 can be shifted (up or down) quickly enough to settle even a near-rail-to-rail output adjustment in about 20 ms. More clever algorithms, which match the pulse-adjustment time with the error, will obviously allow much faster convergence.

To view a sample code listing for the PIC12-C671, go to www.PlanetEE.com and click on "Ideas for Design."

Average (0 Ratings):

Subscribe
Subscribe to Electronic Design and start receiving more articles like this one
Filed Under:

Check for price and availability on Source ESB:

Go
powered by  
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here
Acceptable Use Policy

Sponsored Links