void setup() {
// put your setup code here, to run once:
volatile char *portf_out,*portk_inp;
portf_out=0x30;
*portf_out=0xFF;
portk_inp=0x107;
*portk_inp=0x00;
volatile char *outf,*inpk;
outf=0x31;
inpk=0x106;
while(1)
{
volatile char x;
volatile long i;
while(1)
{
x=*inpk;
if((x & 0x08)==0x08 )
{
*outf=0x01;
for(i=0;i<200000;i++);
//*outf=0x40;
//for(i=0;i<200000;i++);
*outf=0x04;
for(i=0;i<200000;i++);
//*outf=0x10;
//for(i=0;i<200000;i++);
*outf=0x10;
for(i=0;i<200000;i++);
//*outf=0x04;
//for(i=0;i<200000;i++);
*outf=0x40;
for(i=0;i<200000;i++);
//*outf=0x80;
//for(i=0;i<200000;i++);
}
else{
*outf=0x00l;
}
}
}
}
void loop() {
// put your main code here, to run repeatedly:
}