I am an electronics newbie looking to design an LED flashing circuit with a counter that initially counts from 0 - 9, then counts from 9 - 0. My initial thought process is to have a flip-flop mechanism that triggers when 0 reaches 9 and 9 to 0 vice-versa. This FF mechanism will 'count' the number of times the counters reach 9 or 0 respectively.
The counter will start, and when the FF is in state 1, the circuit will count from 0 - 9 and update to state 2; when the FF is in state 2, it will count from 9 - 0 and update to state 1.
The flowchart provided below should look like the output I want to display:
However, the outputs will be in binary, so I need to use a 3:8 decoder to make it one LED at a time, but my outputs will be reduced by 2 since it is only 8 outputs. Is there any alternative for the circuit I thought of?
The counter will start, and when the FF is in state 1, the circuit will count from 0 - 9 and update to state 2; when the FF is in state 2, it will count from 9 - 0 and update to state 1.
The flowchart provided below should look like the output I want to display:
However, the outputs will be in binary, so I need to use a 3:8 decoder to make it one LED at a time, but my outputs will be reduced by 2 since it is only 8 outputs. Is there any alternative for the circuit I thought of?

