Ich habe das mit dem PINB / PORTB gerade mal versucht. PINB geht nicht. Ich glaube das benutzt man auch nur als Eingang.

Gruß
Thomas