Skip to content
BetterDL

Self-starting counter

Also called: self-starting, self-correcting counter, self-starting state machine

A counter that, from any power-up state including unused codes, reaches its normal counting sequence within a few clock edges and then stays in it.

When power comes on, a counter's flip-flops can wake up holding any pattern, including unused codes that the normal sequence never visits. A counter is self-starting if, from every possible code, it reaches the main sequence after some number of edges.

To check:

  1. Take the final next-state equations (after the don't-cares have been decided).
  2. Substitute each unused code and find its next state.
  3. Follow the arrows. If every path ends up in the main loop, it's self-starting. If any unused code loops back to unused codes forever, the counter has a lock up state.

Drawing a state diagram that includes the unused codes makes this easy to see.

Some counters are not self-starting as built. A plain ring counter started at 0000 stays there. A plain johnson counter with a wrong starting pattern runs round a second, invalid loop. The usual fixes are a reset or preset at power-up, or extra logic that steers bad codes back into the sequence.

startCLKCLKCLKCLKCLKCLKCLKCLK000001010011100101110111

Worked examples

Example

Checking a mod-5 counter

The diagram shows a mod-5 counter with D2 = , D1 = and D0 = , including its three unused codes.

  1. 1.

    101 → 010 and 110 → 010: both land in the main loop at 2.

  2. 2.

    111 → 100: it lands in the main loop at 4.

  3. 3.

    Every unused code reaches a real state in one edge, so the counter is self-starting.

Example

A Johnson counter that isn't

A 4-bit Johnson counter (shift right, complement of the rightmost bit enters on the left) powers up in 0100, which isn't in its normal sequence.

  1. 1.

    0100 → 1010 → 1101 → 0110 → 1011 → 0101 → 0010 → 1001 → 0100.

  2. 2.

    That's a second loop of 8 codes, and it never touches the normal 8 states.

  3. 3.

    So a plain Johnson counter is not self-starting; it needs a reset or extra correction logic.

Common mistakes

  • Checking unused codes against the next-state table, where they're don't-cares. You must use the final equations.

  • Stopping after one step. An unused code may go to another unused code first; follow the path until it reaches the main loop or repeats.

  • Assuming a reset makes self-starting irrelevant. A glitch can still knock a running counter into an unused code.

Practice Self-starting counter

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Self-starting counter is taught in Counters and Finite State Machines.