Hi! I'm not sure what you mean by the input being unstable? Is it too noisy to sample reliably via the analog input of your pic? Perhaps you need a sample and hold circuit or an active full wave recitifier which uses an opamp and an RC filter. Can you post your code and add some more detail to descibe the problem?