See:
Don Hyde says:
An R-2R ladder can be used to turn a group of [digital] output pins into a DAC for a few cents. Below is a 3-bit DAC. Using 3 [digital] output pins (beware of the odball open drain pins, they're no good for this), this circuit will provide 0 - Vcc*(7/8) volts out, with a 2R source impedence.It can be extended to more bits by replicating the MSB R-2R end of the ladder.
Up to 4 bits can be achieved with 5% resistors.
Up to 6 bits can be achieved with 1% resistors.
...
In many applications, it would be advisable to buffer the output with an op-amp.
A circuit like this can achieve waaay higher output frequencies than PWM, and can be easier to filter, at the expense of using up a bunch of pins.
OUT o--+-/\/\/\/\----o MSB | 2R \ / \ R / | +-/\/\/\/\----o Middle bit | 2R \ / R \ / +-/\/\/\/\----o LSB | 2R \ / \ 2R / | --- ///
PICList Thread '[EE]: high res DA challenge'
Also:
See also:
| file: /techref/io/d2a.htm, 2KB, , updated: 2007/2/20 20:17, local time: 2008/7/4 08:46,
38.103.63.16:LOG IN
|
| ©2008 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? Please DO link to this page! Digg it! <A HREF="http://www.piclist.com/techref/io/d2a.htm"> D2A, Sigma Delta, Digital to Analog Conversion</A> |
| Did you find what you needed? |
|
o List host: MIT, Site host massmind.org, Top posters @20080704 Apptech, Jinx, Xiaofan Chen, David VanHorn, Alan B. Pearce, Bob Axtell, William \Chops\ Westfield, Cedric Chang, Gerhard Fiedler, bean, * Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Shultz Electronics, Larry Williams, David VanHorn, Bryan Whitehouse, Timothy Weber, David Challis. Peter Todd. on-going support is MOST appreciated! * Contributors: Neil Narwani, David Cary, Elemer AM Nyiry, Philip J Taylor, Gus Calabrese of Omegadogs.com, Gautama Venegas, Patrick B. Murphy, William Chops Westfield, Peter Todd, Leslie Ellis |
|
.