I suppose this question is probably generic to PIC MCUs, but my current project is using the PIC12F629. I'm confused on whether there is a "proper" practice for what to do with extra I/O pins that you don't need.
My project requires GP0 and GP4 to be outputs and GP2/INT to be an input. The datasheet for the device doesn't specify what to do with unused pins, but I notice that the value on reset for the TRISIO register sets them all at inputs by default. Assuming that the unused pins were not tied to anything, wouldn't this leave them as floating inputs? My understanding is that this is a bad thing.
A thread on the microchip website had made mention that
So, what would be the optimal solution for what to do with the unused ports? Thanks.
My project requires GP0 and GP4 to be outputs and GP2/INT to be an input. The datasheet for the device doesn't specify what to do with unused pins, but I notice that the value on reset for the TRISIO register sets them all at inputs by default. Assuming that the unused pins were not tied to anything, wouldn't this leave them as floating inputs? My understanding is that this is a bad thing.
A thread on the microchip website had made mention that
Okay, so set the unused pins as outputs and set as 0 in the port register. Sounds easy, except that on the PIC12F629, GP3 is input only. This basically forces a floating input on GP3 unless you actually use it for an input.You must NOT leave the pin floating as input. This can make the input circuitry to draw excess current.
So, what would be the optimal solution for what to do with the unused ports? Thanks.