Input masking

Icône de l'outil pédagogique Test of the inputs

This interactive animation is a simplified but accurate representation of the real micro-controller card and of the simulator.
It allows to manipulate the 3 buttons linked to the inputs, in order to find the right mask for the correct programming of the test for these 3 buttons.

After that you have configured the right "mask" ad the right "test" corresponding to the pushing (or releasing) of the buttons, you can copy the resultant lines of code, provided in C language, into your program.

The shadowed zones or the buttons are clickable. In order to simplify, only the bits corresponding to the 3 buttons are active.

Four cases are possible, but only three are useful :

  • The mask bit is 0 and the corresponding test bit is also 0: the corresponding button is not taken into account
  • The mask bit is 1 and the corresponding test bit is 0: the corresponding button is pushed (button is at 0 when pushed)
  • The mask bit is 1 and the corresponding test bit is also 1: the corresponding button is released (button is at 1 when released)
  • The mask bit is 0 and the corresponding test bit is 1: the test will be always false, this case is not useful