What are the flanks of ascent or descent?

Rise flank consists of change of a signal level low to a high level, conversely the flank of descent is the change from a high level to one low, it's really important to know these concepts if programmed automatons or electronics, including the famous Arduino.

Flanks of ascent and descent

When to use the flanks?

On occasions when we schedule an electronic device (or an automaton) we are interested in a response in contrast and not continuous. Complicated, right? well imagine that we have a program for a football where a marker is indicating the outcome of the game, is simple, only detects the ball as it passes through the goal. If programmed you that we want to add one to the result to detect the ball, our program is going to add one each time that reaches a high signal, if at the time the ball is detected 20 cycles of program, we suddenly have 20 goals.

Here have a case of flank of rise, US interests that only detects the rise and us add a point and not add more independently of them cycles of program that perform. By the contrary the flank of down will be the reverse, imagine that in an installation want know if a detector of fire has been reassembly, i.e., that has given a signal high and later a low, as will use the flank of lowered.

Schedule a rise flank

To program a flank of ascent, take into account the State of the entry in the previous cycle of the programme and the current cycle, if the input is different from the output, we have a detected flank. In this case, the previous input should be LOW (0) and the current input HIGH (1), if such event take action. We update cycle input to the present to carry out the process in the following.