also there's some i/o that can't be used as OUTPUT, there's also some with open-drain... just post your code here and say if you're using the internal oscillator or an external crystal... if so wich speed.