void setup() {
// put your setup code here, to run once:
volatile char *dirf,*dirc;
dirf=0x30;dirc=0x26;
*dirf=0xFF;*dirc=0x00;
}
void loop() {
// put your main code here, to run repeatedly:
volatile char *outf,*inc,x;
volatile long i=0,j;
outf=0x31;inc=0x26;
x=*inc;
if(x!=0)
{
*outf=0x01;
for(i=0;i<50000;i++);
*outf=0x02;
for(i=0;i<50000;i++);
*outf=0x04;
for(i=0;i<50000;i++);
*outf=0x08;
for(i=0;i<50000;i++);
*outf=0x10;
for(i=0;i<50000;i++);
*outf=0x20;
for(i=0;i<50000;i++);
*outf=0x40;
for(i=0;i<50000;i++);
*outf=0x80;
for(i=0;i<50000;i++);
}
else
{
*outf=0x00;
}
}