void PORTf_init();
void Timer_init();

/*********************************************************************************************************************/

void setup() {
  PORTf_init();
  Timer_init();
}

/*********************************************************************************************************************/
void loop() {
}
/*********************************************************************************************************************/


void PORTf_init()
{
  volatile char *dirf=0x30;
  volatile char *outf=0x31;
  *dirf=0x01;
}

/*********************************************************************************************************************/

void Timer_init()
{
  volatile char *timer1_TCCR1A=0x80;
  volatile char *timer1_TCCR1B=0x81;
  volatile short *timer1_TCNT1=0x84;
  volatile short *timer1_OCR1A=0x88;
  volatile char *timer1_TIMSK1=0x6f;
    *timer1_TCCR1A=0;
    *timer1_TCCR1B=0;
    *timer1_TCNT1 =0;

  *timer1_OCR1A=62500;//compare match register
  *timer1_TCCR1B=0x0c;// CTC mode & 256 prescalar
  *timer1_TIMSK1=0x02;// enable interrupt mode for Output compare match A
}

/*********************************************************************************************************************/

ISR(TIMER1_COMPA_vect)
{
  volatile char *outf=0x31;
   *outf = *outf ^ 0x01;
}