On Tue, 9 Mar 2010 13:23:07 -0800 (PST), alan smith wrote: > Just curious...not having any experience in DSpics. Looking at detecting a > 38KH > z signal, bascially doing the function of a PLL (this is a sine wave coming > in) > and also doing FSK decoding. Essentially this is a 38KHz subcarrer that has > FSK > (38K/42K) and presently doing it with a 16F PIC and an external PLL chip > (567 I > think..?). Can the DSpic do the PLL function..obviously it can do the FSK > deco > de. Hello Alan, Might be a daft question, but why a PLL ? I'm currently doing something similar, but with a 60KHz signal. I just feed the (amplified and anti-aliased) signal into an ADC pin and then run it through a Goertzel routine. Olin provided details of a very nice algorithm for magnitude detection a while ago in relation to an MSF / WWVB receiver (search the archives), but if you're interested in FSK rather than ASK then the Goertzel algorithm is probably a good choice - I had Olin's algorithm working in simulations but haven't transferred to firmware yet. The good thing about the Goertzel algorithm is that you can give it multiple frequencies for your different FSK states, and it's pretty lightweight in terms of computation (for a dsPIC, and versus a full FFT). You could also get rid of that 567 and other hardware and simplify the circuit somewhat. Regards, Pete Restall -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist