you need to adjust the timer count value.
now it count to 255 and it flows over.
so preset it so it overflows earlier
when time is 16 us now, divide 256 by 4 is 64 times 3 makes 192
also set this value in the ISR after the toggle : tcnt2=192 _________________ Mark
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum