2
\$\begingroup\$

Shouldn't we reset at 9, I believe that a decade counter goes as follows '0->1->2->3...->8->9->0" or at least that's how its done for synchronous BCD counters.

\$\endgroup\$
5
  • 2
    \$\begingroup\$ We need to see the actual code or logic. (My guess is that you have an asynchronous reset on 10, which is different from a synchronous counter where you switch to zero on 9.) \$\endgroup\$ – Oldfart Apr 19 '20 at 10:39
  • \$\begingroup\$ I thought that since both are known as 'decade counters' they both operate on the same logic, which is go back to '0' after reaching '9', this way if one would be connected to a display it would show the sequence '0->1->2->3...->8->9->0' \$\endgroup\$ – Essam Apr 19 '20 at 10:42
  • \$\begingroup\$ Because it's a ripple counter not a synchronous design. In a synchronous counter you would generate a "load 0" or "reset to 0" signal when the counter reached 9, and it would be done on the NEXT clock edge. In a ripple counter it happens immediately, so you wait till the counter reaches 10 then reset it immediately. \$\endgroup\$ – Brian Drummond Apr 19 '20 at 10:54
  • \$\begingroup\$ In other words, for less than maybe 50 ns the ripple counter will have actually a count of ten on its output. \$\endgroup\$ – Andy aka Apr 19 '20 at 11:05
  • \$\begingroup\$ @BrianDrummond that's exactly the answer I needed, would you mind writing this as an answer so I can accept it, thank you. \$\endgroup\$ – Essam Apr 19 '20 at 11:17
2
\$\begingroup\$

Because it's a ripple counter not a synchronous design.

In a synchronous counter you would generate a "load 0" or "reset to 0" signal when the counter reached 9, and it would be done on the NEXT clock edge.

In a ripple counter it happens immediately, so you wait till the counter reaches 10 then reset it immediately. The counter actually reaches 10 - but only for a few nanoseconds before clearing. In the context of a ripple counter, this is acceptable; glitches and momentarily incorrect outputs are part of their operation.

\$\endgroup\$

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.