#include<iom128.h>
#include<ina90.h>
void PD0_key(void)
{
while(!PIND & 0x01));
while(PIND & 0x01);
}
void PE4_key(void)
{
while(!(PINE & 0x10));
while(PINE & 0x10);
}
void main(void)
{
unsigned char number=0xFE;
DDRB=0xFF;
PORTB=0xFF;
DDRD&=0xFE;
PORTD=0x00;
DDRE&=0xEF;
PORTE=0x00;
PD0_key();
do{
PPE4_key();
PORTB=number;
number=(number<<1) | 0x01;
if((number & 0xFF) == 0xFF)
number = 0xFE;
}while(1);
}