# Power consumption by a GPIO during Pull Up or Pull Down mode

Version 1
Question: What is the power consumption by a GPIO when its drive mode is configured as Pull Up or Pull Down under different conditions?

Below description provides the power consumption with Pull Up/Down configuration:

1.

Pull Up:

1.

0 is written to the PRTxDR bit for that pin: In this, the pin will drive a Strong 0.

1.

Pin left floating: Current consumption will be zero.

2.
3.

Pin is directly connected to Vss or through an external resistive load: Current consumption will be zero.

4.
5.

Pin is externally connected to Vdd or through a resistive load: When connected directly to VDD, this will create a short between VDD and GND through the pin and may destroy the pin.  If connected to VDD through a resistive load, current through the pin is Vdd/R

6.

2.
3.

1 is written to the PRTxDR bit for the pin: In this case, the pin will drive a resistive 1 with an internal pull up resistance of 5.6K.

1.

Pin left floating: Current consumption will be zero.

2.
3.

Pin is externally connected to Vss: Current consumption will be Vdd/R pull up. For a VDD of 3.3V, the current would be 3.3/5600 = 589uA.

4.
5.

Pin is externally connected to Vdd: Current consumption will be zero.

6.
7.

Pin is connected to GND through a resistive load:  Current consumption in this case will be Vdd/(R pull up + R load).

8.

4.
2.

Pull Down:

1.

0 is written to the PRTxDR bit of the pin: In this particular case, the pin outputs a resistive 0 with an internal pull down resistor of 5.6 Kohm.

1.

Pin left floating: Current consumption will be zero.

2.
3.

Pin is connected to Vss: Current consumption will be zero.

4.
5.

Pin is connected to Vdd: Current consumption will be Vdd/R pull down. Pull down Resistance is 5.6K.  For a VDD of 3.3V, the current consumption would be 3.3/5600 = 589uA.

6.
7.

Pin is connected to Vdd through an external resistive load: Current consumption in this case will be Vdd/(R external + R pull down).

8.

2.
3.

1 is written to the PRTxDR register bit for the pin: In this case, the pin will drive a Strong 1.

1.

Pin left floating: Current consumption will be zero.

2.
3.

Pin is externally connected to Vss or through an external resistive load: If directly connected to Vss, this will create a short between Vdd and Vss through the pin and may damage the pin.  When connected to Vss through an external resistive load, the current would be Vdd/R.

4.
5.

Pin is directly connected to Vdd: Current consumption is 0.

6.

4.

The current consumption mentioned in the above description is only for the GPIO.  When calculating overall power consumption of the chip, current for each GPIO shoulbe calculated and added with the current consumption of the CPU and other analog and digital resources. For details of power consumption of the PSoC, refer application note AN2216 - Estimating PSoC Power Consumption