// // hello.t412.3.blink.c // #include #include int main(void) { // // initialize LED pin // CPU_CCP = CCP_IOREG_gc; // unprotect clock CLKCTRL.MCLKCTRLB = 0; // turn off prescalar (20 MHz) // // main loop // PORTA.DIR = 0b10; //LED is defined as output int n = 0; while (1) { // Option 1 --> Twice more code // PORTA.OUTSET = 0b10 // _delay_ms(100); // PORTA.OUTCLR = 0b10 // _delay_ms(100); // Option 2 PORTA.OUTTGL = 0b10;//LED is set as active and other pins are left untouched _delay_ms(100); } }