It's probably your copy and paste, because it's done it to me before on this forum, but if the code is indeed correct, your ANSEL, ANSELH, TRISC, and TRISA don't look right. It should a % sign...