Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
There are 2 projects where I use a HEX rotary switch.
I do not use external pullup but rely on the digital pin onboard pull up resistors.
One project has the Switch connected to port pins P0.7 through to P0.4 and works fine. (and has worked fine like this for a couple of years I have built that project)
The other project has switch connected to pins P5.6 through P5.4 and LSB on P12.7 and I cannot read the switch properly. I only every get "1" or "0" from various switch settings. It appears P12.7 LSB works but no reading from the upper 3 bits on P5.
I checked Vio pins an they have 3.3V ok. The continuity between pins and switch are correct and there is no short. The switch is grounded correctly. If I remove power and measure continuity on switch as I change values, I get correct values.
This occurs on all the boards I build so I am confident it is not an assembly issue.
Is there something on port P5 when used as digital input that is different from P0? I am not sure what else to try.