#include <iom16v.h>
#include <macros.h>
void delay_ms(unsigned int k)
{
unsigned int i,j;
for (i=0;i<k;i++)
for (j=0;j<1140;j++);
}
void main()
{
unsigned char i=0;
DDRA=0xff;
DDRB=0xff;
PORTA=0xff;
PORTB=0xff;
while (1)
{
PORTA=~BIT(i);
PORTB=~BIT(7-i);
i++;
if (i>7)
i=0;
delay_ms(500);
}
}