First of all, thank you very much Simon for posting all of these great projects. It's great to have the examples explained so clearly!.
Anyway, i have built the 18f4550 Spectrum Analyser project but it does not seem to work properly when i feed audio to it. I have reproduced the circuit from the diagram on the site and both the pic and the display seem to be working correctly. The project has been built on a piece of veroboard.
However, the actual levels of the buckets seem to be random all the way across the spectrum when it is running. The picture below shows an example of the display when a single frequency is being fed in.
high_noise_disp.jpg [ 116.88 KiB | Viewed 748 times ]
As you can see, the buckets are just random instead of peaking at a certain frequency.
The picture below shows the oscilloscope trace at the W3 point during this test
tone.jpg [ 90.54 KiB | Viewed 748 times ]
When the board is plugged into the PC (my audio source) and there is no audio, the display just has a few random spikes on it. I have also done the same tests with a separate tone generator as the input but i got the same results on the LCD.
In order to rule out any ADC noise causing this, i changed the code to display the level of the ADC across the screen. The picture below shows the resulting display while connected to the PC but with no audio playing. As you can see, it's smooth and flat with no major noise problems.
adc_test.jpg [ 116.72 KiB | Viewed 748 times ]
When i play audio with this test, the wave can be seen moving in the center of the LCD, so i think this proves the ADC is not getting large amounts of random data.
Also, just as the description for the project specified, i have calibrated the timing with my scope. The code was set up to give the ADC conversion time as a pulse on W4 instead of the whole loop time, so i changed the code to include the whole loop and calibrated it based on that.
It almost seems like the code is turning very small changes in the ADC value into random peaks on the FFT output.
I would really appreciate any suggestions or help that Simon or anyone else has that i can use to get this device working properly as i'd really like to see it showing valid frequency levels just like in the Youtube video during the sweep test.
Also, if a copy of the compiled binary is available from someone who has got a tested and working setup, that would be awesome. Then i could at least rule a few things out!.
Thanks in advance,