Arduino has a delay function (ms) to pause a program for a specific time. This is very accurate in milliseconds.
I have a delay function in C used by Keil uVision for the AT89C5131 chip:
void delay( unsigned long duration)
{
while ( ( duration -- )!= 0);
}
This does some delay, but a long value is not exactly like Arduino.
Is there a way to create a function that works like a delay () function in Arduino?
The crystal operates at a frequency of 24 MHz.
Any help would be appreciated.
source
share