i am currently trying to use the 12f675 pic in a metal detector that im building for a senior design class. i want the pic to output a constant 10 khz signal that never stops. also i want it to handle the data aquistion. to be more specific it needs to perform an a/d conversion and then analyize that signal to determine if metal has been detected and if so how strong is the signal so we might be able to figure out what we found. lastly i need to be able to output a signal that can change frequency depending on the data analysis (the different frequencies will be used to make different sounds so we know the strength of the signal so for instance the higher freq means the better the signal)

so far i have got the 10 khz signal to output by flashing a pin. that was no problem. but this is running in a continuous loop that cant be stopped so that the metal detector will continue to operate. so while this 10 khz signal is being produced i have to do all my data analysis which i think i can do at the same time by using those instructions as part of the delay used in creating the 10 khz signal. however if i can do this how do i output the other signal that will be used to produce a sound. i dont think i can have to different loops running continuously creating different freqencies. i think it would be easier if there was a way to use the clkout in gpio4 and just have that output a square wave and just set up conditions to determine what freq it should output but i dont know how to get the clkout to work or if i can even do that with this chip

do i need to use more than one pic for this

do i need to possible get a different pic that would be better suitable for this problem and if so which one

or does anyone have any suggestions or tips on how i can solve this problem using the one pic i have.