It will work on ATtiny85 if you adjusted the CPU frequency (that does include adjusting the fuse bits) and the clock prescaler.
Ok, will do. But now some more questions:
1. I guess last_h, last_low and last_count contain values measured? If so, what do those values represent?
2. How do I convert these values to the actual duty cycle?
3. What is the meaning of ISR(PCINT_vect) ?
4. Can this code be used in a Atmega328P (or Atmega168P)? If not, could I maybe ask you to do that for me (I am clueless at the moment on how to do that)?
Thank you very much!
Erik