Quote Originally Posted by richard View Post
simply put you cannot , reading portx is the only direct way to read the actual status of the pins.

what henrik means is why would you read a port to read the value of outputs you have already set. the outputs will be at the level you set them to
(after a suitable interval to allow pin to settle) {providing load is acceptable}.

what are trying to do ?
The program for the lockcode, at the moment works fine. As mentioned in my first post im not a programmer, i had to find a way to make it work.

So the best suitable solution for me is to light up some LEDs and then read the status of the ports for confirmation.

That's why i made those pins as output and then read the status to confirm if they are 0 or 1.