LED Blinking program by Using Atmega32 - Atmel Studio 6
#ifndef F_CPU // defining clock speed of the processor
#define F_CPU 16000000UL // 16 MHz clock speed
#endif
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
DDRC = 0xFF; //Nakes PORTC as Output
while(1) //infinite loop
{
PORTC = 0xFF; //Turns ON All LEDs
_delay_ms(30); //1 second delay
PORTC= 0x00; //Turns OFF All LEDs
_delay_ms(30); //1 second delay
}
}
LED Blinking By using 8051 in Keil IDE
LED Blinking using PIC 16f877a