I would like to be able to rotate through 3 states (A, B, A+B) with one momentary push button (M) as follows:
- starting state: A is high, B is high
- after having pressed on M a 1st time : A is high, B is low
- after having pressed on M a 2nd time : A is low, B is high
- after having pressed on M : back to starting state
I designed a circuit achieving this behavior as a falstad simulation. It seems to work fine, however it requires 2 flipflops, 2 OR gates, 1 NOR, 1 XOR and 1 AND gate.
Is there any way to simplify it ? Or are you aware of an IC able to achieve this kind of behavior with less parts involved ?
Thank you a lot for your help.
Note: The logic is meant to energize 2 different relays. The starting state can be different as the one above (but at least A or B must be high).