At 3:52 PM +0000 2/12/03, Timothy Box wrote: >Hi all > >I need to be able to round off the square wave coming from the HWPM on my >PIC. The HPWM output is being used to generate sound. I am currently using >the standard 2 Rs + 2 caps which works in a fashion but is still rather >harsh. The freq range is potentionaly from 247 hz up to 12.5 kHz so an >active filter is needed (I think). Can any body point me in the right >direction? Sounds like you might be a fellow synth player. In any case you need a low pass filter (LPF) that can track the freq setting of the HPWM. You have more than a 5 octave range, so if you adjust a non-tracking LPF to make the low notes sound right the high notes will be barely (or not at all) audible, and if you adjust the LPF to make the high notes sound good the low notes will still sound "harsh". One way to do this would be to find a filter circuit that uses a pot to set the cutoff frequency, and then substitute a digital pot in the circuit. Then when the PIC changes it's HWPM Freq you have it also set the digital pot to the corresponding LPF cutoff freq. Since this is a music application you might also think about modulating the pulse width with, say, a 1 cycle/sec triangle wave to make the timbre dynamic and rich. Also if you go the route above you can modulate the LPF to give notes a timbre envelope (that synth "WOW" sound). -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics