#define DELAY 500000
void setup() {
// put your setup code here, to run once:
volatile char *dirf,*outf;
volatile long i;
dirf=0x30; outf=0x31;
*dirf=0xff;
while(1){
*outf=0x01;
for(i=0;i<DELAY;i++);
*outf=0x02;
for(i=0;i<DELAY;i++);
*outf=0x04;
for(i=0;i<DELAY;i++);
*outf=0x08;
for(i=0;i<DELAY;i++);
*outf=0x10;
for(i=0;i<DELAY;i++);
*outf=0x20;
for(i=0;i<DELAY;i++);
*outf=0x40;
for(i=0;i<DELAY;i++);
*outf=0x80;
for(i=0;i<DELAY;i++);
}
}
void loop() {
// put your main code here, to run repeatedly:
}