You need to look at the datasheet to see the details for the pin you are using. In this case PORTA.2 is TTL when used as an input. Then you look at the DC characteristics to see the input high level for TTL which depends on Vdd but should be about 2V or a bit less in any case.
Bookmarks