> >I wondered if it was possible to create a DAC with just 1 ADC pin. > >The reason is that I have just a few pins and pwm is too slow. > > Robert Rolf suggested a method to me many, many years ago: 100R from pin to > 1u0 cap +. Other side of cap is Gnd. Output voltage comes from cap > +. This is a high impedance output - buffer as required. > > Read the voltage on the pin and compare to the desired value, then set the > pin as output (either HI or LO, as required) for a very short period to > 'nudge' the voltage in right direction. The voltage on the cap will track > the desired value. How utterly obvious. How utterly brilliant !!! The ATtiny26 that I happen to be using, which has zillions of A2D inputs, suddenly acquires new capabilities. Some playing with time constants would be needed to optimise results. Now we need an 8 channel analog buffer :-) Russell McMahon -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads