i agree with robert , check port A config as a start point , as port a 0-5 are analog optional , also when connecting port at 64mhz i had some very bad results when not using the "LATA.x" commands...