Hi,
ihr habt mich schon ein riesen Stück weiter gebracht! Jetzt funktioniert es bei fast allen Inputs. Nur PinB.4 funktioniert noch nicht, hier wird dauerhaft eine 0 eingelesen. Laut Datenblatt kann dieser Pin auch als Slave Select Input(SS) verwendet werden.
Auszug aus dem Datenblatt:
Code:
• SS – Port B, Bit 4
SS: Slave Select input. When the SPI is enabled as a Slave, this pin is configured as an
input regardless of the setting of DDB4. As a Slave, the SPI is activated when this pin is
driven low. When the SPI is enabled as a Master, the data direction of this pin is controlled
by DDB4. When the pin is forced by the SPI to be an input, the pull-up can still be
controlled by the PORTB4 bit.
Da ich den SPI nicht verwende, müsste ich ihn dann doch ganz normal als Input/Output benutzen können?! Oder muss der SPI vielleicht disabled weren? Aber selbst wenn der SPI irgendweswegen enabled ist, sollte PinB.4 als Input definiert sein, denn : "When the SPI is enabled as a Slave, this pin is configured as an
input regardless of the setting of DDB4."

Habt ihr eine Idee?

Gruß
Jan