Saturday, 19 September 2015

Chaser in ATMEGA32L

#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
int i;
DDRD=0XFF;
    while(1)
    {
        PORTD=0X01;
_delay_ms(500);
for (i=0;i<7;i++)
{
PORTD=PORTD<<1;
_delay_ms(500);
}

    }
}

No comments:

Post a Comment