Home › Forums › Microcontrollers › PIC Microcontroller › Microsecond variable Delay in MikroC › Reply To: Microsecond variable Delay in MikroC
April 22, 2015 at 10:41 am
#11251
Ligo George
Keymaster
It is very difficult to obtain accurate variable microsecond delay function. Make the oscillator clock frequency as high as possible and you can use Delay_Cyc() in MikroC which creates delay based in clock cycle. You may also try creating your own delay function like the following (following code is not calibrated for microsecond).
void Delay(unsigned int i) { for(;i>0;i--) { } }