Please check:
Does PortA.4 require an Pull-Up-Resistance ?
Did you trap into a read-modify-write-problem, because to output of PortA.1 is bad designed and the voltage on this output can't rise to 3,x Volt or more. Then this input is read as "0" and written as "0" while changing PortA.4 !
www.sprut.de
Bookmarks