#include<iom128.h>
#include<ina90.h>
void m_delay(unsigned int m)
{
unsigned int i,j;
__disable_interrupt();
for(i=0; i<m; i++)
for(j=0; j<2650; j++);
__enable_interrupt();
}
void main(void)
{
unsigned int L_shift,R_shift,i;
DDRB=0xFF;
PORTB=0xFF;
while(1)
{
L_shift=0x01;
R_shift=0x80;
for(i=0; i<8; i++)
{
PORTB=L_shift;
L_shift = L_shift << 1;
m_delay(100);
}
for(i=0; i<8; i++)
{
PORTB=R_shift;
R_shift = R_shift >> 1;
m_delay(100);
}
}
}