structure for PWM in place
a bit more structure added to the demonstration files. Need to tidy up some registers