Shop OBEX P1 Docs P2 Docs Learn Events
PLL implementation — Parallax Forums

PLL implementation

Mik_uOLEDMik_uOLED Posts: 7
edited 2011-07-19 21:20 in Propeller 1
Hi!
Is anybody knows if there is a way (as simple as possible) to make a software PLL (phase locked loop) implementation with the propeller?

The goal is tracking a square wave of about 100 KHz!

I wish that is possible!

Thank you!

Mik_uOLED

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-07-19 20:18
    Yes, it's definitely possible. See this thread for some hints:

    The difference, in your case, will be that the target oscillator will be one of the Propeller counters, and the reference will be the incoming signal.

    Hint: To advance the phase of a counter without changing its frequency, add an increment to its frequency, then subtract it right away. To retard the phase do the opposite: subtract, then add. Do not try to modify the phsx register while the counter is running.

    -Phil
  • Mik_uOLEDMik_uOLED Posts: 7
    edited 2011-07-19 21:20
    Thank you very much for your answer Mr Pilgrim!

    That is EXACTLY what I need: great idea and simple solution (sorry, I mean clever solution but for me that is the samething)!

    Quite easier than learning Z transform and filter theory!

    I will not forget your hint too (I will not touch the phsx while counting)!

    You did an excellent work!

    Thanks again, I appreciate a lot!

    Mik_uOLED
Sign In or Register to comment.