if your program is adversely affected by an unused pin then your code is incomplete and needs more debugging
if your program is adversely affected by an unused pin then your code is incomplete and needs more debugging
Warning I'm not a teacher
No the program itself but on the total current consumption as the CMOS do not like to be float.
Ioannis
Especially when in the presence of stray RF. They make rather nice antenna's.
Dave Purola,
N8NTA
EN82fn
its my understanding that pins left as inputs and tied or pulled down to vss will minimise current consumption.
when i'm breadboarding a design I let them float and have never had an issue , if you accidently plug something
into a input pin at least smoke is not released.
Warning I'm not a teacher
Depends. If you care about minimum current as is the case in battery operated devices, then yes. Do set them as inputs with proper pull up enabled inside the PIC or a large size output.
I found that makes no difference, at least for the chips I used, to set them as outputs logic low, and use no pull up or down. Pull up/down can also contribute to current consumption.
I attach the page 2-4 of the Tips and Tricks, file DS01146B regarding I/O that has more info on this.
Ioannis
![]()
I believe that any input pin must be pulled either up or down depends on the use. If there is a switch normally most of the people, pull up a resistor at the input pin, and the switch goes to ground.
Now for the rest of the pins personally if the pins are output and digital, i leave them floating, but i use the command:
Just read Ioannis previous post. It is really useful info. Thanks a lot.Code:PORTx = low
Last edited by astanapane; - 4th July 2018 at 07:33.
Bookmarks