On Wednesday 07 January 2004 21:30, I wrote: > That still limits me to a square wave though. > It would be nice to have some time for some d/a conversion that would lead > to a lower THD. (less parts, more complex software = cheaper and more fun > for a hobbyist) hmm. A little calculation shows that I have this time. I need an interrupt every 355 cycles (@5 mhz), one bit every interrupt, 32 bits/period: 5MHz/(335*32)=440.14 Hz (=0.03% high) 355 cycles to calculate what bit should be given to the integrator should be enough :) hmm again. A pic running at 20 MHz xtal driving a 40 bpm led string is a division by 30000000... (after all it started with a metronome) well... thats gonna eat some registers... Greets Koen -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads