This may be a stupid question but have you verified that the signal on PortA.1 is working the way you expect it? What is driving this pin? If it is some kind of open-collector output, for instance, it needs a pullup in order to generate a '1'. I always check the hardware before I assume there is a problem with the software. I can't remember how many times I have put the wrong kind of signal on a pin and wondered why the software did not work.





Bookmarks