Arqade Asked on March 10, 2021
I want to have a series of 12 memory cells to control an analog clock I am trying to make. I have a hopper clock that triggers every 100 seconds (the equivalent of an hour in a Minecraft day) and each time it activates, if cell i is active, I want cell i+1 to activate and all others to be off. Ideally also if the cell 12 is activate and the clock triggers again, I want to deactivate 12 and activate 1 so it wraps around.
I was experimenting around with having a RS NOR latch for each memory cell, and then with each pulse of the clock, for each memory cell, I pass through the pulse and the S value into and AND gate and if true, that will trigger the next memory cell in the array to be set true and also to trigger the reset of the current memory cell.
I can’t seem to get this working well though. What I have https://imgur.com/QIctUwt so far seems to be close. The torches on top of the bricks are the S values of each RS NOR gate. When the hopper click first triggers, the leftmost cell turns on. Then it triggers again, and the leftmost cell turns off and the second cell turns on. But then, as the hopper clock keeps triggering, the leftmost cell just keeps toggling on and off. I think I messed the logic up somehow.
There must be an easier way to do this, but I can’t seem to think of it. Any suggestions into how to make this easier?
Probably the easiest and most robust approach (using actual memory cells is prone to entering illegal states like 2 cells active) is to use the N-state T flip-flop design; in this case 12-state. It's a simple loop of interleaved droppers and hoppers, activated all at once by a common line of redstone dust. There's one item in the loop, and a comparators indicates in which of the droppers it is. Upon pulsing the dust with redstone signal, the item is shifted to the next dropper (ejected into a hopper on rising edge, inserted into the dropper after falling edge).
As long as you maintain the topology, you can take liberties with the geometry - make it into 2 parallel lines of 6 pairs, or snaking back and forth; you can also insert more hoppers (at cost of small delay to the shift). Skipping hoppers or adding droppers without hoppers is asking for trouble though; the update order may shift the item an arbitrary number of droppers on one activation without the hopper buffer present.
Correct answer by SF. on March 10, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP