> -----Original Message----- > From: Russell McMahon [SMTP:apptech@PARADISE.NET.NZ] > Sent: Thursday, February 13, 2003 1:08 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [EE]: Rounding the square wave > > I haven't even tried to think this through but you could probably > implement > a simple switched capacitor lowpass filter in hardware whose cutoff > frequency moves with drive frequency AND use the PIC to supply the drive > frequency which is ratio locked to the PWM frame rate. > Not really practical. The two CCP outputs share the same timebase, so it would have to be done in software. Problem being, the OP's top fequency was around 12kHz, you'd need at least 50 times that frequency i.e. 600kHz which isn't going to be fun to do in software if you want it to do anything else. Mike -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.