Hello All, I got a CD74HC4046 and started to experiment. It seems that this is a newer version, which has another phase comparator instead of the zener diode. There has been some changes in the chip basically. PC1out is a xor gate, and PC3out is an RS flip flop. It will give pulses if one source is behind, and it will give reverse pulses if one source is forward. PP pin gives the reverse of every phase differences corresponding to a rising edge, so it is half the xor pulses in frequency.
I made the following circuit on breadboard: 1PPS pulses from both RTC and SYNC source gets inverted, (because we are interested in falling edges) - Signal and comparator pins of 4046 is fed with those pulses. The PC1 out is a XOR phase pulses, for both rising and falling edges, so we are only measuring it for display purposes on the following images. P3Out gives a pulse, if source is behind it will give a sharp pulse from 0 to logic 1 voltage, and if source is forward it will be at logic 1 voltage, and give a sharp drop. (On the circuit above the 4046 has no zener, but PC3 instead). The PP output from 4046 inverted gives as the phase pulse, no matter if it is lacking or forward it will give the same normal pulse. By using and gates and getting !PP & PC3Out gives us forward pulse, and !PP && !PC3Out gives us reverse pulse. Here is a logic analyzer capture of XOR, Forward pulse and reverse pulse, when the RTC is behind. And here Source is behind So in summary, we get pulses from one pin saying that the RTC is behind, and if RTC is forward it will pulse from the other pin. I will now proceed to feed these pulses into the RC network. I got this far tru experimentation with the 4046. The VCO can also be inhibited for low power consumption, (since we are only using the phase comparators) I tried a lot of logic circuits to cover a generalized case of the phase difference between clock pulses, but now I want to make a hybrid algorithm which will work with interrupts until within certain range steering the clock in to the zone, and then it might tune from the RC networks. (I would use two of them, for increasing and decreasing the oscillator) I would love to hear your comments for the above circuit because I might have overlooked something major, that will screw up the operation. Best Regards, Can
_______________________________________________ time-nuts mailing list -- time-nuts@febo.com To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts and follow the instructions there.