Electronic Design

  
Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


[Ideas For Design]
Create A D/A Output Using Two Pins On A PIC Micro

Contributing Author  |   ED Online ID #3890  |   June 18, 2001


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


Reprints   Printer-Friendly  Email this Article  RSS    Font Size   What's This?



POST YOUR COMMENTS HERE
Name:

Email:
Your Comments:

Enter the text from the image below


Please refresh the page if you have trouble reading this text.

Search Electronic Design
     
  
 
Email Newsletter
Sponsored By:
Electronic Design UPDATE provides readers with late-breaking news, opinions from industry experts, and timely technology stories. It's a unique opportunity to get your product message in front of engineers, engineering managers, and corporate managers while they're reading about critical information online.

Enter Email to Subscribe
  

Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources