Hi,
You have Duty1 as the "index" for the lookup table. Duty1 is therefor expected to count 0, 1, 2, 3, 4...44 but you are overwriting Duty1 with the value of Duty2 so the indexing (the for-next loop) wont work properly.

Use Duty2 directly when setting the dutycycle register or use another variable for indexing the lookup table (and don't overwrite it in the middle of the loop).

/Henrik.