On Thu, 8 May 2003, Stef wrote: > Des Bromilow wrote: > > >The other option is a variation on Roman Black's BTC method (which incidently I still haven't got working, but I suspect the problems lay within my code and cct) > > > Oh that's indeed an interesting scheme. > I guess you can even improve it by allowing the output pin go into > tristate (switch to input). > > But what I had in mind was feedback of the integrated signal. > I expect to need much less filtering then with pwm. > So I can achieve high frequency spikes. The only way a pulse modulation scheme like the one Roman proposes will work is if the impedance of the load is well characterized. (Or a more accurate statement is that the accuracy depends on how well the firmware knows the characteristics of the load.) There is no feed back, so the internal software integrator needs to match the external hardware one. If feedback is added as you suggest, then this problem can be avoided. Adding feedback and still maintaining the single-pin requirement is, well, challenging! There's a single pin ADC on my web page: http://www.dattalo.com/technical/software/software.php http://www.dattalo.com/technical/software/pic/a2d.asm However, it's very slow and probably not suitable as a feed back pin for a one pin DAC. But for a two pin solution... Scott -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads