Serious bug regarding float to int converion for pwm corrected, interrupt implementation added