Edges

Edge detectors give a one-scan pulse when a signal changes.

What it does

A rising edge is the moment a signal goes from 0 to 1; a falling edge, from 1 to 0. R_TRIG and F_TRIG detect that change and set their output for a single scan. They remember the previous scan: use one instance per use.

When to use it

Do something once per button press, count an event, start a sequence without repeating it every scan.

In this category