ATtiny84 enable pullup resistors

From wikipost
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


  • If PORTxn is written logic one when the pin is configured as an input pin, the pull-up resistor is activated.
  pinMode(PB0,INPUT);     // set PB0 as input
  digitalWrite(PB0,HIGH); // enable the internal pull-up resistor
  • If PORTxn is written logic one when the pin is configured as an output pin, the port pin is driven high (one).