ATtiny84 enable pullup resistors: Difference between revisions

From wikipost
Jump to navigation Jump to search
(Created page with " * If PORTxn is written logic one when the pin is configured as an input pin, the pull-up resistor is activated. <pre> pinMode(PB0,INPUT); // set PB0 as input digita…")
 
(No difference)

Latest revision as of 01:52, 16 August 2012


  • 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).