Close

Phase detector support in firmware

A project log for GPS Disciplined xCXO

A DIY GPS disciplined 10 MHz reference clock

nick-sayerNick Sayer 03/11/2016 at 04:170 Comments

I got the boards back today that include the hardware phase discriminator.

So far as I can tell, everything is working properly - the ATTiny841's hardware systems all line up as expected, and the phase discriminator is yielding ADC values that seem more correct than not.

What I'm struggling with now is how to take these two bits of information - the phase ADC value and the number of 10 MHz cycles since the last PPS rising edge - and turn them into a reasonable error value for the PI controller that's in charge of the DAC.

I just can't quite wrap my brain around it.

It seems to me that what I should be interested in is the change in phase rather than the absolute phase. But then I need to be concerned with unwrapping the phase data... This could get a bit hairy.

Discussions