hallo hab ein kleines problem! müsste die pull-up-widerstände von den ports deaktivieren! kann mir das jemand erklären? mfg.fabian
Steht in jedem Datenblatt: Hier ein Beispiel für einen PortB: PBn, General I/O pin: The DDBn bit in the DDRB register selects the direction of this pin, if DDBn is set (one), PBn is configured as an output pin. If DDBn is cleared (zero), PBn is configured as an input pin. If PORTBn is set (one) when the pin configured as an input pin, the MOS pull up resistor is activated. To switch the pull up resistor off, the PORTBn has to be cleared (zero) or the pin has to be configured as an output pin The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not active. Also für einen Input: PORTB &= ~_BV(PB0); // Pull up aus für PB0 DDRB &= _BV(DDB0); // PB0 ist input oder für einen Output: PORTB &= ~_BV(PB0); // Pull up aus für PB0 DDRB |= _BV(DDB0); // PB0 is output Reiner
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.