#define DELAY 100000
void delay(){
for(volatile long i =0; i<DELAY;i++);
}
void setup() {
volatile char* dirf,*dirk;
dirf =(volatile char*) 0x30; dirk=(volatile char*)0x107;
*dirf = 0xff;*dirk=0x00;
}
void loop() {
volatile char* outf;
outf = 0x31;
*outf = 0x01;
delay();
*outf = 0x03;
delay();
*outf = 0x07;
delay();
*outf = 0x0f;
delay();
*outf = 0x1f;
delay();
*outf = 0x3f;
delay();
*outf = 0x7f;
delay();
*outf = 0xff;
delay();
*outf = 0x00;
delay();
*outf = 0x80;
delay();
*outf = 0xc0;
delay();
*outf = 0xe0;
delay();
*outf = 0xf0;
delay();
*outf = 0xf8;
delay();
*outf = 0xfc;
delay();
*outf = 0xfe;
delay();
*outf = 0xff;
delay();
*outf = 0x00;
delay();
}