In the console meter we offered a pushbutton set up that allowed Peak only, ave only, or both. I am not aware of anybody who didn't like both.joaquins said:It might be a nice touch to implement to the final version, I don't like that misbehavior that goes up and down with a sine. I would end with a lower sample rate but that should be fine. Same thing if using two channels.
I intend to have a mode switch and a peak hold to have different display modes, only VU, only peak, bar dot, floating bar. It could also have two peak time responses.
If the internal A/D multiplexes two inputs to one A/D you may experience settling time issues in the Sample and hold, like I did... but I was running 12*** bit A/D and wider display range.In C things are much shorter, compilers are efficient enough if you have care (like avoiding unnecessary divisions and floating point) The code takes less than 2kB as it is and only 27 bytes of global variables. I don't like to use local variables in this kind of code as I only have 2kB of memory and using functions with not defined calls might overflow the memory, hard to keep track of that when the code gets larger. I do intend to add at least two channels. A gain reduction input option would also be nice so it can be used in compressors.
*** I rectified the raw audio inside the micro so only got 11 bits of raw dynamic range, but averaging the samples per the time constant added (some) resolution back.
The settling time error looked like crosstalk ghosting between a loud input and a quiet one. I overcame it by collecting a number of samples in a row and averaging them to remove the apparent crosstalk. With only 10bit you may not have that problem.
who?........ Dorrough actually got a patent for that POS (even after my patent was issued), which reveals how squirrely the PTO is. You can read his patent but I wouldn't expect much insight. As I recall his slick lawyer invented some different legalese terms for peak and average to blind the examiners into thinking his meter was novel (also curved his display). :100ms looks a bit slow but it was a decision I made, as the thing I don't like about analog meters is the blurring effect some have, it kind of appear half bright when the level is in the limit, with digital ones the LED is even on or off but it can blur if the update is too fast. I might make things a bit faster and add some hysteresis or hold so it looks smoother. I wish to know Dorrough's parameters!
As always the devil is in the details...I still have to add some option for the extended range, as with only 10 bits it get's a bit short, using 9 LEDs, 6dB steps I would get the dot lit a few LEDs up. If intended to be used with 16 LEDs 3dB steps this would still be an issue. This µC doesn't have PGAs, so I have to implement something external, hopefully simple enough. I want to try using a digital pin as input (set to high Z) when not attenuating and as output (low Z) to attenuate. I have to overcome the DC offset, not to shift when switching, so I don't loose the sample, and the trigger for this, which could be the last conversion to go up and the output to go down in gain.
JS
tag you are it. 8)
JR