Ok, but these 2 examples run into the same problem. You've set the pwm duty cycle using CASE and now the program must go into a loop to change the pwm duty according to feedback from a current sense resistor. In that loop the the program needs to start the pwm at the number in the correct CASE and then ignore it every time it loops through as the CASE number could be incorrect. Within that loop it will be monitoring for a change of SETTINGS so it can jump to the next loop for that particular current output. How would the CASE work to exclude the current CASE number in each loop after it has looped once?