This'll clean your clock! -- and calm your jitters.
Phil Pilgrim (PhiPi)
Posts: 23,514
The Propeller's NCO and PLL counter output modes suffer phase jitter under certain circumstances, namely when there are a lot of "1" bits after the highest-order "1" bit in FRQx. The jitter can be remedied by adding an external PLL. This will help, even with the counters' PLL mode, if the external PLL has a longer time constant than that of the Propeller's built-in PLLs. To test this, I used the following short program to generate a jittery counter output:
The output frequency was around 5 MHz with pronounced phase jitter. I ran this signal through the following circuit, which is a phase-locked loop* with an extremely long time constant (i.e. not one you'd want to use for frequency modulation):
The result was a square wave clock of the same average frequency, but without the phase jitter. To quantify the improvement, I ran each signal through my scope's FFT analyzer, saving the raw input as a reference, and displaying the PLL'd spectrum below it:
Clearly visible in both spectra are the fundamental and some odd harmonics, as would be expected from a square wave. But the straight counter output has a lot of small peaks nestled amongst the expected harmonics, which is caused by the phase jitter. The PLL output has none of that.
I haven't tried shortening the PLL time constant to see where the jitter starts to show up. This was more just a proof of principle to see if the external PLL would help. And it did.
-Phil
* The 74LV4046 is just a much speedier cousin to the venerable CD4046.
[b]CON[/b] [b]_clkmode[/b] = [b]xtal1[/b] + [b]pll16x[/b] [b]_xinfreq[/b] = 5_000_000 [b]PUB[/b] start [b]frqa[/b] := $f77_7777 [b]ctra[/b] := %00100 << 26 | 0 [b]dira[/b] := 1 [b]repeat[/b]
The output frequency was around 5 MHz with pronounced phase jitter. I ran this signal through the following circuit, which is a phase-locked loop* with an extremely long time constant (i.e. not one you'd want to use for frequency modulation):
The result was a square wave clock of the same average frequency, but without the phase jitter. To quantify the improvement, I ran each signal through my scope's FFT analyzer, saving the raw input as a reference, and displaying the PLL'd spectrum below it:
Clearly visible in both spectra are the fundamental and some odd harmonics, as would be expected from a square wave. But the straight counter output has a lot of small peaks nestled amongst the expected harmonics, which is caused by the phase jitter. The PLL output has none of that.
I haven't tried shortening the PLL time constant to see where the jitter starts to show up. This was more just a proof of principle to see if the external PLL would help. And it did.
-Phil
* The 74LV4046 is just a much speedier cousin to the venerable CD4046.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
Post Edited (Dr_Acula) : 6/5/2010 8:02:25 AM GMT
Do you have an application in mind? Looks like something the "Propeller as radio transmitter" idea could use.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Why did I think a new, more challenging, job was a good idea ??
Can you also check what frequency range the circuit works at (without changing any componet values) ?
I'd be very interested to know.
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134
March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
· 1) Never divulge all information
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you choose not to decide, you still have made a choice. [noparse][[/noparse]RUSH - Freewill]
'Still a lot experimenting to do...
-Phil
It appears that, with the circuit shown, the capture and lock range is 2.5 MHz to 5.6MHz.
-Phil
Instead of using NCO, could you use PLL single-ended, then set the PLL to 1x and get the same result? (Use the Propeller counter internal PLL?)
-Phil
www.national.com/analog/timing/clocking
It uses a low-cost crystal and varactor diode.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
'Interesting chip family. They have a high pin count, though, and are a bit on the spendy side.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM