REDSTONEPEDIA › Circuits › Memory and counters
Memory and counters
Remember things: a light that stays on after someone crosses a tripwire until you reset it, the digits of a combination lock, or doing something every 4th item through a hopper.
The pictures show each design with its inputs and a lamp on its output; the block counts leave those out.
Counter: counts pulses and reacts on a set count
Counts input pulses and changes its output once every few pulses (a set count).
Copy-and-hold memory (D latch)
The output copies the data input (D) while the enable input allows it, and keeps its last value otherwise.
Copies its input on each clock pulse (D flip-flop)
On one edge of the clock input the output takes the value of the data input D, and holds it until the next such edge (a D flip-flop).
Copies its input on each clock pulse when enabled (D flip-flop with enable)
A D flip-flop with an enable input: on the clock's edge it takes the data input only while the enable input is powered, otherwise it keeps its value.
On button + off button memory (RS latch)
A pulse on the set input (S) turns the output on and it stays on; a pulse on the reset input (R) turns it off.
Moves bits along on each clock pulse (shift register)
A row of memory cells: each clock pulse moves every bit one step along, so the data comes out a set number of clock pulses later.
Toggle switch with a reset button (T flip-flop with reset)
A toggle switch with a reset input: each press flips the output, a press on R turns it off.
A card that comes in several sizes lists every size, with the best design of each, on its page.