You can average the past N analog samples and feed it to the pwm, this will add a little amount of lag but smooths the movement
your current configuration:
(i might be a bit off with the aliases names but you get the idea.)
Code:
pwmXX = Get_Analog_Value(ana_in_yy)/4;
now try this:
averaging 5 samples
Code:
static int temp[5]=0;
temp[4] = temp[3];
temp[3] = temp[2];
temp[2] = temp[1];
temp[1] = temp[0];
temp[0] = Get_Analog_Value(ana_in_yy);
pwmXX = (temp[0] + temp[1] + temp[2] + temp[3] + temp[4])/(5*4);
the more samples you average, the smoother the moviement but the longer the lag.