void setup() {
  // put your setup code here, to run once:
  volatile char *dirf,*dirk;
  volatile char *outf,*outk;
  volatile long i;
  dirf=0x30;dirk=0x107;
  outf=0x31;outk=0x108;
  *dirf=0x03;*dirk=0x03;
  while(1){//by using portf & k data registers the dot leds controlled
    *outf=0x01; //column
    *outk=0x01; //row
    for(i=0;i<100000;i++);
    *outf=0x02;
    *outk=0x01;
    for(i=0;i<100000;i++);
    *outf=0x01;
    *outk=0x02;
    for(i=0;i<100000;i++);
    *outf=0x02;
    *outk=0x02;
    for(i=0;i<100000;i++);
  }
  

}

void loop() {
  // put your main code here, to run repeatedly:

}