I'm not using the rectifier for FFT, that's a completely separate channel and a separate part of the project. The rectifier is for measuring time delay.
Also ADRESH means the high values for the 10 bit conversion, so I meant to say left justified, meaning 256 values and a 20mV step quantisation. I accidentally miscalculated and thought I only had 7 bits.
The conversion time in the datasheet says that conversion takes around 2 - 6 microseconds - is this information reliable?
I do understand that the A/D converter has 10 bits, and I want to use the high 8 bits - ADRESH. However I will have to put a threshold on my input to ignore noise underneath 50mV.
Also is it alright if I supply VREF with 15V? It will still give me the 0V - 5.12V range right?
With the FFT thing, I actually have 5 piezos on a drum, 4 on each "corner" which are going through the full wave rectifying circuit to measure amplitude and time delay at the same time. The 5th piezo is in the centre and is connected directly to the line in of the computer, of which we'll be performing FFT experiments on separately - It's kinda like killing two birds with one stone - so the FFT has nothing to do with this circuit or the PIC chip whatsoever and any questions asked in this thread from me will be mostly to do with how to program the chip, whether I'm doing it right or doing something horrendously wrong as I expect I will be doing as I am completely new to coding for PIC chips and have to learn it within the next week or so.
I'm sure I'll be absolutely fine with your support though.
Once I get the chance I'll grab some shots of the waveform sample through the rectifier - The full wave rectifier was extremely important and in some waveforms the initial peak (which is what we'll be measuring the time delay from) was inverted.
Also a last question for today, is it ok for a voltage of around -200mV to go into the A/D as the signal seems to dip below the 0V line for a few milliseconds after a drum hit, or will a small voltage like that damage it as well?