Bob Ammerman email (remove spam text)
This sounds like a neat project.
If you want to do the Vu meter thing, you might consider the following
Take each analog input, run it thru an op-amp to buffer it (so you don't
affect the signal in its normal use).
Take the output of the op-amp and half-wave rectify it with a diode
(actually, I think you have to include the diode in the op-amp's feedback
somehow so that you don't have the diode drop affecting your output).
Run the resulting DC signal thru a resistor to a cap. This forms a simple
Connect the cap to an A/D input on the PIC.
In your PIC code, periodically reprogram the A/D input to be an output and
drive it low. This will discharge the CAP.
Then, go back to an A/D input, give the signal time to charge the cap up
(this time interval should be very consistent), then read the voltage on the
Since you want a logarithmic display, you could actually just use each bit
of the converted result to drive one of the LED's (each LED would then
represent a factor of 2 (I think that is 3 dB!).
(high function, high performance, low level software)
See also: www.piclist.com/techref/microchip/ios.htm?key=audio
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the