#include "TimerInit.h"
#define PERIOD 500 // control loop period [ms] - max 4194 ms !!!
boolean state = LOW;
void setup()
{
pinMode(0, OUTPUT);
digitalWrite(0, LOW);
TimerInit( PERIOD);
}
void loop() {
// nothing to do
delay(100); // to improve simulation performance
}
// Controll loop goes here
ISR(TIMER4_COMPA_vect)
{
state = !state;
digitalWrite(0, state);
}