Hector Martin wrote: > I'm trying to control the PC speaker (motherboard beeps etc) volume using > PWM (software-driven PWM from a PIC) but I'm not really sure now to > design the circuit. I'm not sure about using PWM for controlling audio volume in general. Most PWM frequencies are within the audio range, and you'd need to do some good filtering to get rid of this unwanted artefact in the output. Maybe in the case of the PC speaker this is less of a problem, but maybe not. The ear is pretty good in hearing those things over several decades. What's your overall objective? Does it have to be PWM? If you just want to manually control it, a simple pot would be enough :) If you want to be able to do electronic control, some kind of multiplying DAC could do it. That can be as simple as a bunch of resistors that form a 5 bit divider (which should be enough steps). Depending on how you want to control it, it may not even have to be a PIC -- an up/down counter for example could do it. Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist