Makaram
Member
Hey guys,
Made a custom delay function so that it could take variables since __delay_us(); doesnt
function is void delay_us(int a)
{
for(int i = 0; i < a; i++)
{__delay_us(1);}
}
simple as they come.
Yet when I put 1500 (center the servo) it freaks out where using the inbuild delay function works.
In fact the delay time (a) to center with this function is 55?!?!!?
what is going on here. i realise that the function may be a little laggy but that much/?
Made a custom delay function so that it could take variables since __delay_us(); doesnt
function is void delay_us(int a)
{
for(int i = 0; i < a; i++)
{__delay_us(1);}
}
simple as they come.
Yet when I put 1500 (center the servo) it freaks out where using the inbuild delay function works.
In fact the delay time (a) to center with this function is 55?!?!!?
what is going on here. i realise that the function may be a little laggy but that much/?