#include <iom128v.h>
#include <macros.h>
void delay(unsigned ms)
{
unsigned int i,j;
for(i=0;i<ms;i++)
{
for (j=0;j<1140;j++);
}
}
/*void main()
{
DDRA=0xFF;
PORTA=0XFF;
DDRB=0xFF;
PORTB=0XFF;
DDRC=0xFF;
PORTC=0XFF;
}*/
void main()
{
unsigned int m;
while(1)
{
for(m=0;m<8;m++)
{
DDRA&=~BIT(m);
PORTA&=~BIT(m);
delay(100);
DDRA|=BIT(m);
PORTA|=BIT(m);
delay(100);
}
}
}
|