Bugfix for KLxx/K20 pwm period

Period is MOD + 1, so needs to add/substract 1 in the correct places