As usual... post your code here, the whole thing.

Make sure you have disabled the analog stuff on PORTA, PORTB.

Without the right config fuses setting, it may ruine your life.. sure there's a few to set.