Circuit controlling 6 leds

digital-logicled

I want to build a circuit with logic gates and flip-flops, in each clock which will turn 6 LEDs in
the following sequence: 1 – 6, 2 – 5, 3 – 4, 4 – 5, 4 – 6, 5 – 6, (repeat). I have spent 2 days in order to get perfect design. Does anybody can help me for making the perfect structure.
enter image description here

Best Answer

There is a simple process you can follow for your design:

1. Identify the number of states

From what you have said it appears you have 6 states - 6 different outputs in your sequence before it repeats. So build a counter which counts up from 0 to 5 then resets as it reaches 6. This will be your input.

There are different counters you can make - a 3bit binary counter can go from 0-7 so you would just need reset on 6 logic. You could make a counter which is just 6 registers in a cycle where only one is ever high - the 1 then cycles round (one-hot). And so on.

2. Work out your outputs

In you case you have 6 LEDs. These are your outputs. So you need to draw a Truth Table for each output which relates the output to each of your inputs (see 1.).

3. Determine the Logic

Next once you have your truth tables, you need to determine the logic needed to make that mapping. The easiest way to do this is to build a Karnaugh Map for each LED. Use the map to determine the logic that maps the input counter to the LED value for each of the states.

4. Simplification

It may then be possible to reduce the logic by simplifying the result from the Karnaugh Maps. This can be done by looking at the Boolean expressions and applying various rules of Boolean algebra.