Recently, I am working on the low power consumption of the PIC microcontroller. So I set different I/O port States to test the power consumption. The current is measured using a series multimeter. the I/O port of the microcontroller is suspended, the entire system is not driven by peripherals, and the test uses the pic16f690 microcontroller.
The idea is as follows: after the system is powered on, all Io is initialized, and then sleep () is called to enter the sleep state.
1. Ports A, B, and C are all input and pulled up: the power consumption is about UA after sleep.
2. Port A, port B, and port C are all input drop-down: the power consumption is about UA after hibernation.
3. Ports A, B, and C are all output pull-up. After sleep, the power consumption is about UA.
4. Ports A, B, and C are all output drop-down lists: power consumption after hibernation <1ua. In any case, the number of DC 2mA data records in A multimeter is zero. I don't know how much Na there is, but the above measurement data is enough to give some inspiration to our colleagues.
In practice, reduce the operating frequency of the crystal oscillator and disable the BOR undervoltage reset settings to reduce power consumption. Note that you need to pull the suspended I/O pin to VDD or Gnd. If it is set to only input and output, but not to pull to VDD or drop down to Gnd, the power consumption will be very high, and the power consumption will increase by at least 10 times. Tens of millions of attention!