Most Helpful Member
See.... I don't understand.... What do you mean....my question was why not 1000/5 or 2000/5..?
If you are trying to delay by 1Us then with a while(x--) ( this is test and decrement a word variable ). then its not possible in C..... I have shown that it takes 10 cycles in the while statement... That's too much time... If I pass 1000, ie 1mS, it would delay FAR too long... Why don't you just use the inbuilt delay functions, or write youur own in assembly.. I can't explain any further..
If you are asking why I'm using 1500 in the routine.... 1500uS is 1.5mS... CENTER POSITION... Look at Mr T's diagram...