Dear All,
I am used to program ARM7 LPC2148 IC by Keil (Version -4) in 12 MHz, pls find the below delay,
So fro that how can i Calculate the time delay (used by 12MHz in Keil software).
void delay_1() { int d,d1; for(d1=0;d1<100;d1++) for(d=0;d<65000;d++); }
Software delay loops like this are notoriously awful. Is there ANY way you can use some hardware timer, or clocking register??
Use volatile keyword, tends to preclude the optimizer removing code. If you want to calibrate your routine, toggle a GPIO and measure with a scope, or aforementioned timer. This is a job for you, not the forum.