Looking for help with Prop based VU meter

I searched the forums and OBEX for a VU meter and didn't come up with anything. Has anyone ever made a VU meter with a Prop?
For the audio in it can be mono, I have some small mics and A/D chips if needed, or if there is small external circuit to not use a microphone that would be even better. The audio is very low volume, like headphone style amplification.
For the output, 5 LEDs is okay, or anything just so I get an understanding of how the output would work.
Thanks very much for any help!
For the audio in it can be mono, I have some small mics and A/D chips if needed, or if there is small external circuit to not use a microphone that would be even better. The audio is very low volume, like headphone style amplification.
For the output, 5 LEDs is okay, or anything just so I get an understanding of how the output would work.
Thanks very much for any help!
Comments
This may help: http://www.sparkfun.com/tutorials/120
' SndMeter.pbas ' This program is for use on the Propeller Demo board ' It will sample the on-board microphone and light the LEDs, creating ' a simple sound meter. ' DEVICE P8X32A, XTAL1, PLL16X FREQ 80_000_000 ' Define CONs POSFB CON 72 ' Counter mode for POS detect with feedback ADCVALUE CON 4096 ' Maximum value of ADC ' Define PINs MicFB PIN 8 INPUT MicOut PIN 9 OUTPUT LEDs PIN 23..16 LOW ' Define HUB variables ' none ' Define DATA (DATA, WDATA, LDATA) ' none ' Define TASKs ' none ' Define variables (LONGs only) time VAR LONG offset VAR LONG = 0 sample VAR LONG lastSample VAR LONG = 0 temp VAR LONG ' Define Subroutines ReadADC FUNC 0 ' Start of main code PROGRAM Start Start: ' Setup CNTA for ADC mode COUNTERA POSFB, MicFB, MicOut, 1, 0 time = CNT + ADCVALUE ' Allow ADC circuit to stabilize FOR temp = 1 TO 1000 sample = ReadADC NEXT ' Get sum of 64 samples to get an average offset value FOR temp = 1 TO 64 sample = ReadADC offset = offset + sample NEXT offset = offset >> 6 ' Divide by 64 because we summed 64 samples ' Get a sample and display on LEDs DO ' You must make sure you get back here before the next sample is due sample = ReadADC ' Subtract average offset from sample sample = sample - offset ' If sample is negative, then negate it (make it positve) sample = ABS sample ' Only show 8 MSB of sample sample = sample >> 4 ' Show sample value on LEDs LEDs = sample LOOP END ' Subroutine Code FUNC ReadADC WAITCNT time, ADCVALUE __PARAM1 = PHSA - lastSample lastSample = lastSample + __PARAM1 RETURN __PARAM1 ENDFUNC
Bean
All I need is that and the schematic for a Demo Board which I found here (PDF) http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/PropellerDemoBd-RevG-Schem.pdf
Thanks a lot! I'm going to use it to move a servo, not light LEDs. I'll post my code when finished.
This way the LEDs are displaying a log scale (the audio level voltage has to double before the next LED will light).
Bean