Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.datemas.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Phil Hobbs Newsgroups: sci.electronics.design Subject: Re: Microcontroller phase locked loop, ping Tim Wescott et. al. Date: Thu, 06 Aug 2015 17:13:38 -0400 Organization: A noiseless patient Spider Lines: 77 Message-ID: <55C3CE02.6060903@electrooptical.net> References: <55c39580$0$7076$4c5ecfc7@frugalusenet.com> <55C39FEF.5010708@electrooptical.net> <86e7sals26g209bj9rehe105b0uj5lrglk@4ax.com> <55C3C040.50707@electrooptical.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: mx02.eternal-september.org; posting-host="e1355fd8c2133ed0e70d1dbfee3de196"; logging-data="21481"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1kIWP9Y8XI5pS1eLsD3Ju" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: Cancel-Lock: sha1:v40BGEnPHAEEHlUtHVv2FbFhoAw= Xref: csiph.com sci.electronics.design:371909 On 8/6/2015 4:58 PM, upsidedown@downunder.com wrote: > On Thu, 06 Aug 2015 16:14:56 -0400, Phil Hobbs > wrote: > >> On 8/6/2015 3:48 PM, upsidedown@downunder.com wrote: >>> On Thu, 06 Aug 2015 11:19:55 -0700, Jim Thompson >>> wrote: >>> >>>> On Thu, 06 Aug 2015 13:57:03 -0400, Phil Hobbs >>>> wrote: >>>> >>>>> On 8/6/2015 1:12 PM, bitrex wrote: >>>>>> Has anyone successfully implemented a phase locked loop on a >>>>>> microcontroller? >>>>>> >>>>>> The frequency of interest would be somewhere in the 200kHz range, and >>>>>> the objective of the PLL would be FM demodulation. So I'd have an input >>>>>> for the FM modulated frequency, and an external VCO in that range that >>>>>> the uC would hopefully control via filtered PWM. Other than that, this >>>>>> is mostly hypothetical for now. >>>>>> >>>>>> Does this seem possible? I have the following reference: >>>>>> >>>>>> http://liquidsdr.org/blog/pll-howto/ >>>>>> >>>>>> I'd be hoping to use something like an ATTiny. All code would be >>>>>> adjusted to use fixed-point math, I'd imagine. >>>>> >>>>> For a given resolution, you might as well just use a counter input. >>>>> >>>>> It's not going to be a very good demodulator...what modulation frequency >>>>> and modulation index are you looking to accommodate? >>>>> >>>>> Cheers >>>>> >>>>> Phil Hobbs >>>> >>>> Awwwh, shucks, Phil, Don't you know that the solution for all analog >>>> problems is a uP ?>:-} >>>> >>>> ...Jim Thompson >>> >>> Get away with the VCOs and do it with NCOs and you can do FM, PM and >>> AM quite easily. No need for PLLs or phase detectors. Of course the uP >>> must handle about 500 kHz interrupt rate :-). >>> >> >> Pretty slow PLL if you can do it at that rate. Of course not every >> application needs good performance--if all you care about is not losing >> count, digital is great. >> >> Cheers >> >> Phil Hobbs > > I understood that the required frequency was in the 200 kHz range, so > a 500 kHz NCO update rate should be sufficient. > Unless you want good phase control. Nyquist is not the whole story in frequency control, by a lot. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net