phoenix_1, The code as written is assuming setpoint is set which after a reset is probably defaulted to 65535....

Dave Purola,
N8NTA