I am trying to reduce the power consumed by microcontroller pic16f1618, and hence I thought of using SLEEP(). All interrupts such as timer, and pin are disabled. The code is generated with the help of MCC(code configurator). The function call to timer and pin initialization is commented. Microcontroller is running at 16MHz. I am measuring the current consumed by microcontroller under two circumstances.
- There is just a main() function after system initialization, there is a code to read a pin inside main(). - current consumed is 8.4mA
- There is SLEEP() after reading the pin in main(). - current consumed is 6.6mA
The pic16f1618 is powered through a battery management chip, bq40z60. Multimeter is placed between the voltage source of 12V and the battery chip input voltage. Hence the current measured is a total of current consumed by battery chip and pic16f1618. BQ40z60 consumes a maximum of 1.8mA.
Even though there is reduction in current consumption, it is not significant. The data sheet documents in nA. Considering the pins are not inputs, the current consumption should at least be in uA. Is there anything I need to look into?