Summary
A smoothing register that periodically samples a fluctuating input and holds that value constant until the next sampling pulse. Useful for debouncing requester chest demands.
Description
This device smooths out rapidly fluctuating item signals by periodically sampling the input and holding that value constant until the next sample is taken. In effect, the circuit “debounces” the input. The device was created to reduce power wasted by logistic drones constantly supplying then taking away items to requester chests wired to demand items dynamically.
Components
-
Clock (a.k.a. "free-running counter")
- Constant combinator: Outputs a C signal with quantity 1. Also outputs period signal P (e.g. P=60).
- Decider combinator: Outputs the C signal back to its input if the C signal is less than P in quantity. Since a decider combinator with its output tied to its input will cause the output to be added to the signal generated every game tick by the constant combinator, the result is a counter that cycles from 1 to P, advancing by 1 every game tick.
-
Reset Signal Generator (a.k.a. "sampling strobe")
- Decider combinator: Receives as input the C signal from the clock. Checks if C equals exactly 1 each game tick. If so, it outputs the reset signal R. Since C equals 1 only one tick every P game ticks, the R signal is pulsed for only a single tick every P game ticks.
-
Inventory Updater (a.k.a. "data sampler")
- Decider combinator: Receives as input the R signal from the Reset Signal Generator. It also receives as input the fluctuating item list. If R equals 1, the Inventory Updater outputs a snapshot of the fluctuating item list for one game tick.
-
Memory Cell (a.k.a. "storage register")
- Arithmetic combinator: Receives as input the item list snapshot from the Inventory updater. It also receives as input its own output. It also receives, as input, the output of the Memory Cell Updater. The arithmetic operation the Memory Cell performs is simply to add 0 (i.e. nothing) to its input when generating its output. The Memory Cell generates two outputs: the first is the aforementioned signal it sends to its input; the second is an identical signal sent to the Memory Cell Negator.
-
Memory Cell Negator (a.k.a. "complement generator")
- Arithmetic combinator: Receives as input the output of the Memory Cell. The arithmetic operation performed is a negation of this input: the Memory Cell output it receives is multiplied by -1. The output of the Memory Cell Negator is passed on to the Memory Cell Updater.
