you have to make the port an input:
So If I connect 5v to pin 22 I would be able to do avalue = PORTAand value should now be 1?even though PORTA is not set as an input?
PORTB = PINA;
value = PORTAand value should now be 1?/quote]As Nick mentions, you need to read PINSA and not PORTA. Keep in mind that if the pins are floating you'll be reading random values on the unconnected pins.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16