Added switch-case to set timer1-bits according to prescaler Fixed calculations for nextTick to match chaned code