REDSTONEPEDIA › Circuits › Memory and counters

Toggle switch with a reset button (T flip-flop with reset)

reacts in 13 ticks (0.65 s) · 8 blocks

Each press flips the output on or off; a press on R turns it off.

resets in 6 ticks (0.3 s) · fits in 3×3×2

Toggle switch with resetToggle switch with reset3D view loading (or not available in this browser)

Try it

Use the R and T buttons under the view to drive the inputs: each tap flips OUT on or off (the box marked OUT turns red while the output is on). Press play under the view to watch a demo on a loop; touch any other control to take over.

How this design does it: T flip-flop with reset, dropper ring, sealed: two droppers and two hoppers pass one stone around; a comparator reading the second dropper is the output; every hopper top covered so no stray item reaches its timing.

Build it

Download .litematic Download the design as text

The .litematic opens in Litematica (Minecraft 26.3): every block of the design in one region. The text file is the same build written as plain text, block by block.

Comes loaded with 1 stone in its containers: the download includes it; building it by hand, put it in first.

Blocks used: comparator dropper glass hopper redstone wire

Details: how it works, measurements and properties

In depth

a toggle switch with a reset input: each press flips the output, a press on R turns it off

How to try it

Press play under the view to watch the demo on a loop (the badge reads demo with the step it is on; the same sequence is drawn as a timing diagram below). Touch any control to stop it and try the circuit yourself.

To try it: press and hold the R button of the bar (or the cell tagged R) to power that input; a quick tap sends a short 2-tick pulse; press and hold the T button of the bar (or the cell tagged T) to power that input; a quick tap sends a short 2-tick pulse.

Inputs are tagged in lime; the output is tagged OUT: the orange glass marker next to it glows while the output is on (the output strip by the demo badge shows its last 40 game ticks, 2 seconds). Drag to look around, pinch or scroll to zoom, step one game tick at a time with the step button.

Inputs and output over time

The inputs follow this schedule (the 3D view's demo plays the same). Lime: an input is on; orange: the output is on (taller = a stronger signal, 1 to 15). Time runs left to right in game ticks (20 ticks = 1 s).

A t 200A r 200RTOUTticks050100150200250300350400450500550600650700750800850900950100010501100

Swipe the diagram sideways: the whole sequence lasts 1162 ticks (58.1 s).

Step by step (23 lines)
A t 4: q 0 -> 1 after 13 ticks (0.65 s)
A t 4: q 1 -> 0 after 6 ticks (0.3 s)
A t 4: q 0 -> 1 after 13 ticks (0.65 s)
A r 4: q 1 -> 0
A r 4: q 0 -> 0
A t 4: q 0 -> 1 after 13 ticks (0.65 s)
A r 4: q 1 -> 0
A t 4: q 0 -> 1 after 13 ticks (0.65 s)
A t 4: q 1 -> 0 after 6 ticks (0.3 s)
A r 4: q 0 -> 0
A t 20: q 0 -> 1 after 22 ticks (1.1 s)
A r 20: q 1 -> 0
A t 20: q 0 -> 1 after 22 ticks (1.1 s)
A r 20: q 1 -> 0
A t 30: q 0 -> 1 after 32 ticks (1.6 s)
A r 30: q 1 -> 0
A t 200: q 0 -> 1 after 202 ticks (10.1 s)
A r 200: q 1 -> 0
B t 3: q 0 -> 1 after 13 ticks (0.65 s)
B t 3: q 1 -> 0 after 6 ticks (0.3 s)
B t 2: q 0 -> 1 after 13 ticks (0.65 s)
B t 2: q 1 -> 0 after 6 ticks (0.3 s)
B r 4: q 0 -> 0

Measurements

metricvaluewhat it means
latency13 ticks (0.65 s)the worst time from an input change to the output's change
reset6 ticks (0.3 s)
min-pulse2 ticks (0.1 s) (the shortest a real input makes)the shortest input pulse handled correctly (every longer one works too)

Notes from its designer

T flip-flop with reset, dropper ring, sealed: two droppers and two hoppers pass one stone around; a comparator reading the second dropper is the output; every hopper top covered so no stray item reaches its timing.

Properties

StudyMemory and counters
KindToggle switch with a reset button (T flip-flop with reset)
Blocks placed8 (not counting the input levers or buttons the view adds)
Box3×3×2 (18 blocks of space)
Made of (the blocks that change state)comparator, dropper, hopper, redstone wire
Inputs / outputsR (repeater), T (repeater) / OUT
Design filetffr-ring-sealed-v18-8b

The design file

on GitHub

Design file (27 lines)
# Toggle switch with reset: reacts in 13 ticks (0.65 s) · 8 blocks
# https://vjeux.github.io/redstonepedia/circuits/memory/tffr-ring-sealed-v18-8b.html
name: tffr-ring-sealed-v18-8b
circuit: tff-reset
port input.r: 1 0 2
port input.t: 1 2 0
port output: 2 0 1
nbt: 0 0 0 {Items:[{Slot:0b,id:"minecraft:stone",count:1}]}
origin: 0 0 0
palette:
  C minecraft:comparator[facing=east,mode=compare,powered=false]
  D minecraft:dropper[facing=east,triggered=false]
  G minecraft:glass
  H minecraft:hopper[enabled=true,facing=north]
  R minecraft:redstone_wire[east=side,north=side,power=0,south=side,west=side]
  c minecraft:comparator[facing=west,mode=compare,powered=false]
  d minecraft:dropper[facing=west,triggered=false]
  h minecraft:hopper[enabled=true,facing=south]
layer -1:
  .
  ..G
layer 0:
  Dh
  Hdc
layer 1:
  .R
  C