Microcontroller phase locked loop, ping Tim Wescott et. al.

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

--
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
Reply to
Phil Hobbs
Loading thread data ...

When you say "allow", do you mean "cause"? If you're just trying to temperature compensate the free-running frequency, that's a frequency-locked loop (FLL) rather than a phase-locked loop, and is a much easier problem. Using a uP to implement an FLL is quite reasonable.

For a current project, I'm doing something a little bit similar: linearizing VCOs using a Labjack plus a cubic spline fit. (The spline is done inversely, i.e. the frequency is the independent variable and the spline gives you the corresponding DAC code.)

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
Reply to
Phil Hobbs

Y'know, for all that I'm usually pounding a drum about using a micro -- why here? If you're doing the oscillator in analog-land, why not implement the whole PLL there?

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

I understood that the required frequency was in the 200 kHz range, so a 500 kHz NCO update rate should be sufficient.

Reply to
upsidedown

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
Reply to
Phil Hobbs

The stuff that "piglet" posted was sort of up my alley - I guess a FLL _is_ what I'm after. I want a tunable RF VCO with a center frequency that doesn't drift all around.

formatting link

Reply to
bitrex

+1. I wanted to say that, but couldn't figure out how to do it in less than 100 words.
--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

I assume that you must be talking about using the phase accumulator MSB directly, which of course would generate a lot of phase jitter.

Apparently the OP intended to use multiple VCOs, so the final signal would be analog sine wave. The alternate method would be to use a NCO with sine lookup, DAC and LPF (anti-alias reconstruction filter). This should solve the phase jitter problem quite nicely (at least when avoid any pathological case such as 1/2, 1/3 etc. fOut/fClk ratios).

If your phase error claim would be true, then a band limited audio signal below 20 kHz could not be properly processed with only 44.1 kHz sampling rate and the audiophools would be correct :-). Unfortunately they forget the effect of the reconstruction filter.

About using a processor as an NCO, the simplest would be to perform all operations (phase accumulator update, sine look-up and DAC loading) during the sample clock interrupt.

However, since the interrupt service overhead (including cache reloads) is quite large and if the waveform is known a few milliseconds in advance, the sample values for all NCOs could be calculated in advance and insert them into FIFOs. The ISR just picks the next value from the FIFO and loads into a DAC.

Even better, if the FIFO is in hardware with the DAC, multiple sample values could be loaded in a fast memory to memory copy, without a need for frequent interrupts as in sound cards.

Reply to
upsidedown

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.