pwm in a busy loop working

tested with fifo scheduling, still flickery

did some optimisation, only write to the GPIOs when there is a change of
data, or change in the pwm state