> On Apr 11, 2012 2:54 PM, "Wouter van Ooijen" wrote: >> >> > Why not do software PWM on the existing I/O pin then? All that is > needed is >> > a low pass filter. >> >> Quote Neil: FWIW, there's too much going on in the chip >> to get any decent bit-banged PWM. >> > I remember someone here describing a D to A output based on a random > number. It wasn't timing sensitive. From my memory: if your random number > is below your target value turn the output on, else output is off. I don'= t > know if it's viable with a pseudo random generator. > I also did some PWM with "sample and hold." When not PWMing the output, I'd tristate it. The C of the series RC LPF acted as a hold capacitor. Depending on required update time, accuracy, etc., it might be possible to output a single pulse with a certain period high, then a certain period low, then tristate until you come around again. I did this to drive 48 analog outputs with a single PWM output of a PIC (demultiplexing the single PWM pin into a bunch of hold capacitors). Harold --=20 FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! Not sent from an iPhone. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .