Posts tagged ‘Led blinking withAVR Studio 4.0’

Led blinking program with ATMEGA32 and AVR Studio 5.0

The first “Hello World!” project I prefer for Microcontroller is LED Blinking. I have used AVR  microcontroller .  Here,All pins of PORTB declared as output.

Source Code

Here,i have  written code  in C using AVR Studio 5.0.

* ledblinking.c
* Created: 3/30/2011 9:36:30 AM
*  Author: sfg

#include <avr/io.h>
#include <util/delay.h>

int main(void)
DDRB=0xFF; //all pins of PORTB declared as output
//TODO:: Please write your application code
PORTB=0xFF;  //High State
_delay_ms(200); //delay
PORTB=0x00; //low state
_delay_ms(200); //delay


Led blinking With Atmega32


Get every new post delivered to your Inbox.

Join 45 other followers