3
\$\begingroup\$

Currently, I am using an ADC with an external trigger with the caveat that the edge of the trigger must be within +/- 25ns of the ADC's clock (See Figure 3 of the datasheet). The ADC's clock is available on a pin of the ADC.

In this case, the GPIO used to operate the trigger is not synchronized with the ADC clock and therefore synchronization is necessary. Apparently, the best way to do this is with two cascading D flip-flops connected to the same clock in order to ensure that there is no race condition between the setup time and the clock pulse.

There appear to be some gotchas with this approach. Some sources recommend a delay between the two flip flops for added safety. Others say that "synchronization hardened" FFs are necessary.

So, what's the best way to solve this problem? Is there a ready-made logic family that will do the trick? Or a specific IC?

\$\endgroup\$
5
\$\begingroup\$

The two flip-flops are used to avoid issues with metastability. The idea is that the first flip-flop has some small probability of going metastable, but if it does, it's much less likely that the metastable state will propagate to the second flip-flop.

A "hardened" flip-flop has higher internal gain than an "ordinary" flip-flop, which means that a metastable state should decay more quickly, reducing the chances of propagation. However, I've only ever seen "hardening" discussed in the context of custom IC design, and I'm not aware of hardened devices that are available as discrete devices.

Putting a delay between the flip-flops is actually counterproductive, as this would reduce the window of time for the metastable state to decay.

So, just use two flip-flops of whatever technology best fits in with the rest of your circuit.

\$\endgroup\$
2
  • \$\begingroup\$ Given a choice, would you go with NC7SZ74 or 74LVX74 ? Any reasons for or against? The latter claims some "lockout" feature on DIN when the clock reaches a threshold. \$\endgroup\$
    – Damien
    Sep 10 '12 at 23:39
  • \$\begingroup\$ Personally, I'd go with the 74LVX74, since it has the two flip-flops you need in a single package. The "lockout" thing is just an odd way to describe ordinary master-slave behavior. Nothing special there. \$\endgroup\$
    – Dave Tweed
    Sep 11 '12 at 3:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.