Microcontroller › AVR › how to make running led using atmega16 › how many LEDS to want to
February 14, 2011 at 5:26 am
#5525
dagakshay
Participant
how many LEDS to want to interface…
algo for simple running 8 LEDs:
while(1)
{
PORTB=(1<<0);
_delay_ms(100);
PORTB=(1<<1);
_delay_ms(100);
PORTB=(1<<2);
_delay_ms(100);
PORTB=(1<<3);
_delay_ms(100);
PORTB=(1<<4);
_delay_ms(100);
PORTB=(1<<5);
_delay_ms(100);
PORTB=(1<<6);
_delay_ms(100);
PORTB=(1<<7);
_delay_ms(100);
}