Optimizing I/O power consumption
If an input pin is floating, it may result in leakage current from VCC to the ground.
First, let’s take the case of an input pin, that is not floating, but fixed to VCC or ground. The given Figure1 and 2 are input buffer circuitry inside the MCU.
When the pin is in high voltage, T1 is ON, and T2 is OFF. Hence, there is no path for the current to reach the ground. So, in this case, leakage will not happen, since the current never leaks out from the +VCC to ground.
When the pin is in low voltage, T1 is OFF, and T2 is ON because the current from VCC cannot reach the ground. So, in this case, there is no leakage.
Let’s come to the floating state. In this case, the pin’s input voltage not fixed. So, due to the circuit noise, the input voltage may toggle between 50% or 70% of the VCC, which means voltage on the pin may go somewhere in this region. Then both the transistors turn ON with some resistance. So, as a result, a small amount of current sink into the ground taking this path.
But all new microcontroller input buffers use a Schmitt trigger to avoid noise issues.
In the following article, let’s see GPIO Programming Structure.
FastBit Embedded Brain Academy Courses
Click here: https://fastbitlab.com/course1