piLinux
2/18/2016 - 2:10 PM

Structure of AVR C (blinkLED.c explanation)

Structure of AVR C (blinkLED.c explanation)

[comment] 
anything written on the right side of `//` notation, i.e on 
lines 1, 5, 9, 12, 13, 15, 17, 18, 20, 21 and 23.

[includes] 
lines 2-3, here include other important files for your present projects.

[function definitions] 
lines 6-7, define global variables and other functions 
or include library of a function.

int main (void) { 
your C program must have EXACTLY one main function!
	
	[initialization] 
	line 13, initialize the chip or setting the registers for I/O.
	
	[event loop] 
	lines 16-22
	
	return(0); 
	this line is never reached in AVR C programming

}