Pins with A/D enabled will work fine as an output, but will read 0 when the port pin is read. Make sure you disable A/D for whatever pins you're trying to read as digital inputs. And of course make sure the pin is an input.