/* GROUP I DARLAN VIVIAN EDUARDO A. P. ALCHIERI THIAGO MEREGE PEREIRA */ /* I/O PORT B, DATA DIRECTION REGISTER (0 -> in, 1 -> out) */ #define DDRB (*(volatile unsigned char *)(0x17 + 0x20)) /* I/O PORT B, DATA REGISTER */ #define PORTB (*(volatile unsigned char *)(0x18 + 0x20)) /* I/O PORT D, INPUT PINS */ #define PIND (*(volatile unsigned char *)(0x10 + 0x20)) int main(void) { /* Set the whole port (all bits) to "output" */ DDRB = 0xff; while(1) { /* Turns on the leds as soon as the corresponding buttons are pressed PORTB = PIND; } return 0; }