Shop OBEX P1 Docs P2 Docs Learn Events
P2 equivalent of P1 PLL counter modes? — Parallax Forums

P2 equivalent of P1 PLL counter modes?

We have the equivalent of most of the P1 counter modes on P2 via smartpin modes/settings.

However, it appears we don't have anything that works like the P1 PLL counter modes. This was used on P1 to do things like output frequencies up to 128Mhz (above sysclock), and with less jitter and mode precision on frequency selection.

On P2, using NCO_Frequency mode, you can hit higher frequencies than P1 could with regular NCO mode, but things start being problematic if you go above sysclock/8 and really go bad above sysclock/2. At least with my testing.

Am I missing something? I know my analyzer is a factor above a certain point because it can only sample at 500Msps for logic analyzer mode (thus quantizing everything to 2ns steps), but I'm accounting for that I believe.

Also, what is the actual physical pin transition time?

Comments

  • jmgjmg Posts: 15,148
    Roy Eltham wrote: »
    Am I missing something?
    No. Analog PLLs are expensive, and only in the custom ring, so P2 has only one of them.
    If you need better than NCO with a higher sysclk can deliver, then some external generator is needed.
    The Si5351A is a possible next step ?



  • I don't need it for anything I am doing myself. I am just porting over simpletools stuff from P1 to P2, and it utilizes the PLL counter modes on P1 for higher frequencies in stuff like square_wave().

    The P2 version just won't be as capable as the P1 version in this case.

    @cgracey Do you have any comments on this? Is there way to get better precision and less jitter at higher frequencies when using NCO_Frequency mode? Or perhaps some other mode?
  • evanhevanh Posts: 15,194
    edited 2020-05-05 09:25
    I remember Phil voiced a sad face about this a long time ago. As JMG said, there is only the single PLL for the sysclock on the prop2 ... and all counter modes are synchronous digital. They can do a precise dither with the NCO but are limited to output transitions on sysclocks only.

    EDIT: Maybe there are fancy filters, that could be added externally, to reshape the dither into something cleaner, dunno.

  • I means that for NCO_Frequency mode, if you want the output to be reasonably close to the desired frequency, you have to stick with values below sysclock/16 (maybe even sysclock/32), or for frequencies above that only use values that are nice multiples of sysclock. The max is still sysclock/2, if you try to go any faster you get frequencies below sysclock/2.

    For my needs, it's fine. I was just checking to make sure I didn't miss something, and it sounds like I didn't.
  • Yes, I've already said here that I'm also a bit disappointed. So if it comes to metal detection, capacitive sensors, FM broadcast and all other fancy HF hacks the P1 seems to be the better choice. For simple sensors the P2 is a bit overkill and too expensive, anyway.

    This doesn't mean the P2 isn't cool. For example, check out the goertzel demo. It just means it's not 100% backward compatible.
Sign In or Register to comment.