How should i write a delay macro for an PIC 18f87J50 with a 48MHz crystal and compiler of MCC18. The delay should be in us. So I for example can write: Delay_us(201) and really get 201us delay.
What I have now is:
#define Delay_us(n) (Delay10TCYx(((n) * (uint16_t) 12 + 9) / 10))
And it does'nt seems right at my oscilloscope! :/
Kind Regards!
And merry Christmas!