2.2 The Delay Function

Because the speed of execution will, in most cases, cause the LED to flash faster than the eye can see, execution needs to be slowed. _delay_ms() is a built-in function of the compiler. To use this function, the header util/delay.h must be included. Also, the speed of the processor must be specified:

#define F_CPU (3300000UL)

For more details on the delay built-in, see the “MPLAB XC8 C Compiler User’s Guide for AVR MCU” (DS50002750).