.My question is, what do we do with the rest of the TRISB and TRISC bits apart from the RX/TX
that would depend entirely on what you want do with each pin , if and only if you need it to be an output clear the corresponding tris bit
.My question is, what do we do with the rest of the TRISB and TRISC bits apart from the RX/TX
that would depend entirely on what you want do with each pin , if and only if you need it to be an output clear the corresponding tris bit
Warning I'm not a teacher
there is no such state , pins are either inputs or outputs or analog inputs , outputs can only be high or lowI guess we cant leave unassigned the bits
if you have no reason to use a pin as an output then leave as an input , if you have no reason to use a pin as a digital input you can leave it analog
the pic chip won't care. the pic chip does not care if outputs are high or low its only what they connect to that cares , it up to you to initialise the pins
in use to the correct type/state and direction to match the requirement of what they connect to and then make sure they stay that way.
Warning I'm not a teacher
I have my doubts on leaving inputs floating.
Usually if I have any unused ports, I turn them as outputs and clear them.
If they are inputs, maybe enable the pull ups if any or tie them to ground.
A floating pin can cause troubles in certain cases.
Ioannis
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
Bookmarks