We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am now urgant.
Thank you. But I must need ready and tested routines for slow frequence (31kHz, 125kHz, 250kHz etc.).
Please for me.
Hello Urgant,
The function I use is:
void DelayForSpecifiedTimeInMicroSeconds(int TheDelay);
And when I want to have the delay specified by frequency I use the function:
int ConvertFrequencyToPeriod(int TheFrequency);
Just insert this into your code - But don't bother compiling it unless you are prepared to spend time investigating the probable errors the linker might report.
Silly Sausage.
Your functions are incredibly dangerous.
If you were to use a negative integer for the delay the program will go back in time and could destroy the entire space time continuum.
Please change all your programs using these functions to take unsigned numbers, for the sake of the universe.
The compiler could detect that, and would just optimise-out the entire universe?!
That's why such functions should never be written in a high-level language.
Obviously.