5.1 Basic Operation

When scanning the keypad in the basic application example, the CPU continuously polls the I/O lines and busy-waits for delays. This is reflected in the relatively high-power consumption as can be seen in the figures below.

Figure 5-1. Power Analysis, Basic Operation Without Key Press
Figure 5-2. Power Analysis, Basic Operation With Key Press

In addition to using much power, unused pins are not handled correctly by enabling the internal pull up, which may be seen in the instability of the power consumption. When touching the other pins of the device while measuring current, one can clearly see that the results are affected.