1) is that 2 Hz to 40 Khz ? or 40 Hz as you stated ?
2) What is it that you want to display on LCD ? Frequency, amplitude, other ?
3) Sampling rate has to be at least Nyquist, is that 2 x 40 Khz ?
4) Do you want to filter the audio ? If so what do you want filter to do ?
Something like this -
The Opamp can be replaced with a PGA if you need gain.
The mux can be replaced with a HW mux if you need it to be HW controlled rather
than SW controlled for channel selection.
Keep in mind inputs must be limited to Vdd >= Vin >= Vss
If you need to offset some methods -
I am not sure exactly what you are looking for, but I use the MSGEQ7 for a seven band frequency sampling for use in an equalizer. It is very simple and powerful if that is what you need.
Good morning. Sorry for delay in responding to you all.
1) is that 2 Hz to 40 Khz ? or 40 Hz as you stated ? Answer : yes 2 Hertz to 40 KHz.
2) What is it that you want to display on LCD ? Frequency, amplitude, other ? Answer : As sound signal changes frequency also get change to represent Bass, Treable etc in ADC output and in binary same i will display on 16x2 LCD.
3) Sampling rate has to be at least Nyquist, is that 2 x 40 Khz ? Answer : Correct PSOC4 42series have 1MSPS sampling rate from which i will use 100KSPS only which satisfy nyquist theorem.
4) Do you want to filter the audio ? If so what do ypou want filter to do ? Answer : no filteration required just Voltage follower for amplification is enough as per me. Advice me if filteration needed.
Mr. Dana what you mean by below your statement : Keep in mind inputs must be limited to Vdd >= Vin >= Vss .......
In sort in this project output of laptop stereo jack i want to display in binary format on 16x2 LCD.
ADCproject.rar 1.2 MB
Vdd >= Vin >= Vss means that the instantaneous input voltage may not be above Vdd (or Vdda) or below Vss (cannot be less than zero, or negative). Since you don't need gain, Dana wonders whether your signal is of large amplitude and where it is centered.
May turn out to be a hard job running on a PSoC4. To extract information from the audio-stream concerning frequencies (Bass etc.) you will need something like FFT. At a data-rate of 100kHz and a 48MHz CPU clock (assuming no wait-states) you end up in 480 instructions per data-item. This seems quite a few, but you'll have to spend some thoughts into your algorithms.
Since writing to LCD should occur at a rate of not more than 0.1s (or you'll not be able to read much) an approach could be to sample for a short period, calculate FFT and display the result, all withn 1/10th of a second.
Here is an FFT implementation on PSOC 4.
Here is a mish mash of FFT stuff -
You could look into a comb filter solution, in assembler, that might
have some possibility. Since you do not care about phase it could
be implemented in a fast IIR solution. The M0 core has a single
cycle multiplier in it.
Or a tunable BIQuad solution using the muliplier, the key consideration
(one of them) being settling time for real low freqs.