switch (max)
{
case 0: PWMDTY01=1300; ;break;
case 1: PWMDTY01=1350; ;break;
case 2: PWMDTY01=1380; ;break;
case 3: PWMDTY01=1400; ;break;
case 4: PWMDTY01=1420; ;break;
case 5: PWMDTY01=1470; ;break;
case 6: PWMDTY01=1500; ;break;
case 7: PWMDTY01=1500; ;break;
case 8: PWMDTY01=1530; ;break;
case 9: PWMDTY01=1580; ;break;
case 10: PWMDTY01=1600; ;break;
case 11: PWMDTY01=1620; ;break;
case 12: PWMDTY01=1650; ;break;
case 13: PWMDTY01=1700; ;break;