I'm using a PIC16LF1554 with a simple soil moisture sensor to remotely monitor houseplants. The sensor circuit will be powered by a coin cell and will spend most of its time asleep. It will wake periodically (maybe three times daily) to take a reading via ADC, transmit to an always-on master via nRF24l01+ and then go back to sleep. This is a hobby/learning project, not a commercial enterprise.
My question is about minimising current consumption in sleep mode, about which the datasheet says:
To minimize current consumption, the following conditions should be considered:
- I/O pins should not be floating
- External circuitry sinking current from I/O pins
- External circuitry sourcing current from I/O pins
- Current draw from pins with internal weak pull-ups
- Modules using 31 kHz LFINTOSC
I'm comfortable with all but the first item, but I have a number of I/O pins that I'm not using, so I've not connected them to anything in the PCB I've designed (maybe that was stupid). The datasheet goes on to say:
I/O pins that are high-impedance inputs should be pulled to VDD or VSS externally to avoid switching currents used by floating inputs.
So, my question. Is it ok to configure my unconnected I/O pins as outputs and set them LOW (or HIGH)? Would that result in any unnecessary current draw?