> > However, since the ideal design has zero parts, I'm wondering about > another approach. How about if the incoming audio goes through a current > limit resistor to the PIC analog input. Add a clamp diode so the PIC inpu= t > is not driven negative much. This would result in half wave rectification > of the audio, since the PIC A/D would read zero for negative inputs and > read a positive number for positive inputs. > > The next trick is, since we're only updating the display 10 times a secon= d > or so, how about sampling the audio with the PIC A/D 100 times a second o= r > so, then averaging those samples. I'd probably average a number of sample= s > that is a power of two so the division by the number of samples is just > throwing away a few least significant bits. Usually with a VU meter you would want the maximum, and not the average, s= o I would recommend using the maximum of the sampled values. Also, I might be wrong, but usually the PICmicro has diodes of its own, so you might be able to get away with leaving out the diode. You're minimizing parts, after all. Other than that, I don't see why it wouldn't work. Greetings, Maarten Hofman. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist