I wanted to generate a 0.92 ms to 1.92 ms, varying ON TIME PWM signal. Total signal duration is 20ms. For testing the code, i tried generating the maximum and minimum signals.
CODE:
int inmain;
int in1;
int ipmain = 22; //input control pin
int ip1 = 24;
int op1 = 53; //PWM output pin
Apparently, you haven't bothered to look at the documentation for the delay function.
The code however doesnt seem to be working.
Maybe it's just taking a short vacation.
On the other hand, you could try explaining what it does do, what it does not do, and how what it does differs from what you want it to do.
There are too many things you haven't said for us to be able to help you. For instance, what is connected to pins 22 and 24? Do you KNOW that you can read consistent data from those pins? That is, are you certain that the results of digitalRead on those pins is consistent with the input you are providing?