2.3 Configuration Code Example

unsigned char i;

...

/*Set outputs high */

PORTB = (1<<PB7)|(1<<PB6)|(1<<PB1)|(1<<PB0);

/* Define directions for port pins */

DDRB = (1<<DDB3)|(1<<DDB2)|(1<<DDB1)|(1<<DDB0);

no_operation();

/* Read port pins */

i = PINB;

...