Scrap Mechanic

Scrap Mechanic

Not enough ratings
stable 4-mode switcher
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
22.306 KB
7 Nov, 2021 @ 1:02am
1 Change Note ( view )

Subscribe to download
stable 4-mode switcher

Description
Switches up and down between 4 modes/settings
Hightly stable, which is extremely difficult with any sort of flip-flops or memory.
Not compressed/minimised, because if you're using this and care about space, you're better off minimising it yourself.
To that end, the circuit is separated into modules, each of which serves its own micro-function.

Descriptions of each module follow - directions assume that the buttons are at the top, with the green button above the red button:

The green button is mode up, the red button is mode down
White gates at the top are outputs for the modes
The orange gates right below that are part of the calculations for the second and third modes
The two similarly-shaped, yin-yang-looking modules are signal length normalisers for the up and down signals, which prevent spam-clicking of the buttons from causing the flip-flop memory to go haywire the vast majority of the time
The green and red gates below the signal length normalisers are the mode switching logic for the up and down signals respectively. if you want the modes not to wrap around, you can delete the rightmost green gate and the leftmost red gate
The green and red gates between the mode outputs and the input buttons are in-betweens for the signal length normalisers and the mode-switching logic
The red, green, and blue gates to the left of the mode-switching logic are the flip-flop memory
The piston, sensor, and orange gate are for resetting the flip-flop memory when it goes haywire, either because it's on a workbench (that just happens when flip-flop memory is placed on a workbench) or because you've intentionally messed it up (and with the signal length normalisers, you basically *have* to be trying to mess it up for them to go wrong)
The green, lime green, and tan gates above the haywire reset module and the flip-flop memory, as well as the orange gates to the right of the mode outputs are for detecting memory haywire

Have fun!