← All exercises

Count Up

easy

Up-counter with a count input, reset, and a Done output that fires when count reaches 10.

What it teaches

Count how many times something happens. The counter ticks up only on the moment a signal turns on (not while it's held), so each press counts once. A 'done' signal fires when the count reaches a preset target.

Inputs and outputs

TagTypeDefaultDescription
In_CountBOOLCount input pulse
In_ResetBOOLReset signal
Sts_DoneBOOLDone flag

Required behavior

  • Sts_Done is 1 once 10 or more rising edges of In_Count have occurred since the last reset.
  • In_Reset clears Sts_Done and the rising-edge tally.