REDSTONEPEDIA › Circuits › Memory and counters

Counter: counts pulses and reacts on a set count

every 9th pulse · 23 blocks

The output's on/off pattern repeats every 9 input pulses: on for 3 of them, off for the other 6.

made of comparator, dropper, hopper · fits in 6×4×3

every 9th pulseCounter3D view loading (or not available in this browser)

Every size 39

The best design for each size: pick one to see it.

sizeblocksnumbers
every 2nd3 blocks
every 3rd11 blocks
every 4th6 blocks
every 5th19 blocks
every 6th14 blocks
every 7th25 blocks
every 8th9 blocks
every 9th (this page)23 blocks
every 10th22 blocks
every 11th23 blocks
every 12th17 blocks
every 13th23 blocks
every 14th28 blocks
every 15th23 blocks
every 16th12 blocks
every 17th23 blocks
every 18th26 blocks
every 19th23 blocks
every 20th25 blocks
every 21st23 blocks
every 22nd23 blocks
every 23rd23 blocks
every 24th20 blocks
every 25th23 blocks
every 26th23 blocks
every 27th23 blocks
every 28th23 blocks
every 30th23 blocks
every 32nd15 blocks
every 33rd23 blocks
every 34th23 blocks
every 36th29 blocks
every 38th23 blocks
every 39th23 blocks
every 40th28 blocks
every 45th23 blocks
every 48th23 blocks
every 100th23 blocks
every 576th23 blocks

Try it

Hold IN under the view for a long press, tap it for a short one: tap it 9 times and OUT goes through one on-off cycle (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. Its count is the number of items in its droppers: they pass the items one way per pulse, and the numbers over them show how many each holds. Load another number of items (stone here) to make it react on that count.

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 2 stone in its containers: the download includes them; building it by hand, put them in first.

Blocks used: comparator dropper glass hopper stone

Details: how it works, measurements and properties

In depth

It counts input pulses: the output's state repeats every 9 input pulses: after each pulse it is on for 3 of them and off for the other 6. In other words, it divides the number of pulses by 9.

Use it to do something every 9th time, or to slow a fast clock down 9 times.

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 IN button of the bar (or the cell tagged IN) to power that input; a quick tap sends a short 2-tick pulse.

Inputs are tagged in lime; the output is tagged OUT: the redstone lamp in that cell (the view adds it to show the output) lights 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 input follows 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).

press 3 200INOUTticks0100200300400500600700800900100011001200130014001500

Swipe the diagram sideways: the whole sequence lasts 1616 ticks (1 min 20.8 s).

Step by step (37 lines)
pulse 1: output 0 (level 0)
pulse 2: output 0 (level 0)
pulse 3: output 0 (level 0)
pulse 4: output 0 (level 0)
pulse 5: output 0 (level 0)
pulse 6: output 1 (level 1), changed
pulse 7: output 1 (level 1)
pulse 8: output 1 (level 1)
pulse 9: output 0 (level 0), changed
pulse 10: output 0 (level 0)
pulse 11: output 0 (level 0)
pulse 12: output 0 (level 0)
pulse 13: output 0 (level 0)
pulse 14: output 0 (level 0)
pulse 15: output 1 (level 1), changed
pulse 16: output 1 (level 1)
pulse 17: output 1 (level 1)
pulse 18: output 0 (level 0), changed
pulse 19: output 0 (level 0)
pulse 20: output 0 (level 0)
pulse 21: output 0 (level 0)
pulse 22: output 0 (level 0)
pulse 23: output 0 (level 0)
pulse 24: output 1 (level 1), changed
pulse 25: output 1 (level 1)
pulse 26: output 1 (level 1)
pulse 27: output 0 (level 0), changed
pulse 28: output 0 (level 0)
press 1 20: output 0 (level 0)
press 2 30: output 0 (level 0)
press 3 200: output 0 (level 0)
press 4 20: output 0 (level 0)
press 5 30: output 1 (level 1), changed
press 6 20: output 1 (level 1)
press 7 30: output 1 (level 1)
press 8 20: output 0 (level 0), changed
press 9 20: output 0 (level 0)

Measurements

metricvaluewhat it means
N9how many input pulses one output cycle takes
outputlevel every 9 pulseshow the output shows the count: toggles (flips every N), pulses (one pulse every N) or level (its state repeats every N)
countsone pulse per N
on3 of 9

Properties

StudyMemory and counters
KindCounter: counts pulses and reacts on a set count
Blocks placed23 (not counting the input levers or buttons and the lamp the view adds)
Box6×4×3 (72 blocks of space)
Made of (the blocks that change state)comparator, dropper, hopper
Inputs / outputsIN (repeater) / OUT
Design filecounter9-ring3-ring3-sealed

The design file

on GitHub

Design file (37 lines)
# Counter: every 9th pulse · 23 blocks
# https://vjeux.github.io/redstonepedia/circuits/memory/counter9-ring3-ring3-sealed.html
name: counter9-ring3-ring3-sealed
circuit: counter 9
port input: 0 0 0
port output: -6 0 0
nbt: -4 0 0 {Items:[{Slot:0b,id:"minecraft:stone",count:1}]}
nbt: -1 0 0 {Items:[{Slot:0b,id:"minecraft:stone",count:1}]}
origin: -5 0 -1
palette:
  A minecraft:dropper[facing=up,triggered=false]
  B minecraft:dropper[facing=west,triggered=false]
  C minecraft:comparator[facing=east,mode=compare,powered=false]
  D minecraft:dropper[facing=north,triggered=false]
  E minecraft:hopper[enabled=true,facing=north]
  F minecraft:hopper[enabled=true,facing=south]
  G minecraft:glass
  H minecraft:hopper[enabled=true,facing=down]
  S minecraft:stone
  d minecraft:dropper[facing=south,triggered=false]
  h minecraft:hopper[enabled=true,facing=east]
layer -1:
  .
  S..S
  .
layer 0:
  ....hA
  CASCD
  .EB
layer 1:
  ....GF
  .hd.HB
  .GH
layer 2:
  .....G
  .G..G
  ..G