Page 1 of 1

PLL - Phase Comparator

PostPosted: Sat Aug 24, 2013 1:18 am
by steph_tsf
Hello,

I'm trying to emulate the CD4046 integrated circuit using Flowstone DSP.
See the two attached .fsm.
Both are working, however there is room for improvement.
I'm not fluent with Flowstone DSP code, especially when there is conditional and sequential logic.
I have a difficulty emulating the XOR gate making the CD4046 Phase Comparator I.
I have a difficulty emulating the flip-flops and the tri-state output making the CD4046 Phase Comparator II.

With a better DSP implementation of the CD4046 Phase Comparator II, one can build a simple and robust frequency meter for periodic waveforms like sinus, squarewave, triangle, sawtooth, etc.

Will somebody help me improving the Phase Comparator II implementation?

Steph