Hi,
Is it possible to make a delay of approximetely 189.2143mS delay in C?
I must have the code before my friend! SO pleaze show me what you do.
You want a resolution of 0.1us? That requires that you have a high-resolution timer running with at least 10MHz and that the C code is able to poll that timer with at least 10MHz. And if the timer has less than 24 bits, your 10MHz+ loop must also be able to handle timer overflows within that same 0.1us loop time.
Switching from polling to interrupts will not help, since the overhead of the interrupt must then be taken into account.
Sorry, but I think you will either have your friend get a faster processor, or convince him that it will be enough to perform the delay with less precision.
Do program a timer to run at a suitable pace. Then decide if your friend prefers an interrupt handler (to allow the processor to do something else while waiting for a flag to announce that the delay time is over) or if he prefers to busy-loop while waiting. Best is to adjust the timing resolution so it will require no more than 16 bits.
why are you quoting four decimal places if you only want it "approximately" ?!
Note that anything measured in mS is not a delay; it's a conductance - in millisiemens.
A delay would be in ms - milliseconds.