Shop OBEX P1 Docs P2 Docs Learn Events
Frequency Synthesis With Propeller - Performance? — Parallax Forums

Frequency Synthesis With Propeller - Performance?

DroneDrone Posts: 433
edited 2008-03-06 18:23 in Propeller 1
Question...

So each Propeller cog-counter can generate up to 125MHz as a frequency synthesizer (i.e., see the "Frequency Synthesis" Object in OBEX). Obviously, the stability of the output will depend on the stability of the crystal driving the Prop. But my question is what is the jitter and/or phase-noise performance of the Propeller as a synthesizer? Has anyone measured this before? If-so, how?

Regards, David

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2008-03-05 17:53
    David, there are threads.... deeply hidden, as always...

    Tracy Allen had investigated some spectra.. As he has not so many postings it should be not too difficult to find it.

    I remember two threads:
    (1) High precision frequency generator (1 Hz @ 100 MHz or a similar nonsense..); could be last year
    (2) True waveform generation, with intersting contributions from Phil and me, not so long ago
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2008-03-05 18:03
    `
    This one is interesting

    http://forums.parallax.com/showthread.php?p=583301

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob
  • deSilvadeSilva Posts: 2,967
    edited 2008-03-06 00:34
    Just to explain a little of this problem to the uninitiated...
    To output a square wave of a certain frequency - say 20 MHz - requires you to toggle the line each 25 ns. Of course that's just a laugh:
    :loop
      XOR OUTA, [img]http://forums.parallax.com/images/smilies/tongue.gif[/img]inMask
      JMP #:loop
    


    And doing 13.3 MHz takes just a NOP inbetween.
    Well but what's with the values inbetween? Maybe you need 15MHz for some particular reason...

    (a) There is the PLL and the timers which will allow you to generate in a very specific (and small!) frequency range some more values. But there is always this fundamental limit of discrete time..... sooner or later.

    (b) Don't look so overcritical. What's in a frequency? What's Montague, what's Ca.. Oh sorry wrong track...
    When you consider - say - a milisecond, then for 1 MHz 1000 "Highs" (and consequently 1000 "Lows") have to be transmitted. This is the reason an expensive frequency counter tells you :" 1.000.000 Hz". So why not cheat - just a little bit! One could omit each tenth "peak", so we have 9 Highs and Lows just as above and then an addition gap of 1µs. Who cares?
    The stupid frequency counter will say "900.000 Hz".
    People with musical ears however will not like it.

    That is the background of David's question: How to generate such a detailed signal in the first place (are the counters sufficient?) and will it be "compliant" enough for more things but to trick a stupid frequency counter....

    Post Edited (deSilva) : 3/6/2008 12:46:41 AM GMT
  • DroneDrone Posts: 433
    edited 2008-03-06 05:16
    deSilva, you're right. The point is thrashed out in the link provided by Bob. It seems the jitter is going to be pretty bad at most frequencies. As stated by Chip Gracey, "...the only time you'll get a perfect square wave out of this system is when FRQ can divide $1_0000_0000 to produce an integer."

    I have a good spectrum analyzer. I may have a look at the counter output physically just to see how bad it is.

    Thanks for the feedback Gentlemen...

    David
  • deSilvadeSilva Posts: 2,967
    edited 2008-03-06 06:12
    It is a simple "common denominator" algorithm (IAW it is NOT simple smile.gif ). You will get "pure" tones for all binary factors as 40 MHZ - 20 MHz - 10 MHz - 5 MHz - 2.5 MHz - ... 0.037252903 Hz

    Between those values exist options, i.e. you have 230 counter settings to choose from between 40 and 20 MHz. The SIGNAL however will look most of the time just as an 40 MHz signal!
    And than - surprise, surprise! - there is a "glitch". And than it goes on with 40 MHz...
    You can indeed select: 39,999,999 Hz. The "glitch" distinguishing this from a 40 MHz signal will occur around each second....

    Just to make this clear: We are obviously not talking of 40 MHz, but of the whatever clock that is derived from the specific crystal at the given temperature!
  • VIRANDVIRAND Posts: 656
    edited 2008-03-06 18:23
    Perhaps you can get an otherwise unavailable pure tone by heterodyning (Adding two pure tone frequencies with XOR).

    It should be perfect if done in quadrature, that is, having sine and cosine phases for each of the two tones,
    Otherwise, you will probably end up with a mix of the sum and difference frequencies which will not be
    a perfect square wave.

    Thus if you can make a pure "tone" within 2.5 Mhz of 27 Mhz, then you should be able to synthesize all the CB frequencies
    if you wanted to for a project, for example.
Sign In or Register to comment.