It is very strange problem because it should works but it doesn't. My task is to do a a simply function which delay a program.
And after using a function: time after using I want to have a 1 second delay so i increased a number of iteration for 100000 (before 100) , but time hasn't change. after increasing iteration
why? it is logical that if i increase the number of iteration, the time should be longer...
EDIT:
#include <LPC21xx.H>
void Delay(){
long int i;
for(i=0; i<48000000000;i++){
}
}
int main(){
//set pin 16 P1 as out
IO1DIR = 0x10000;
//set pin 16 P1 on 1
IO1SET = 0x10000;
Delay();
//set pin 16 port P1 on 0
IO1CLR = 0x10000;
}
I use a uVision Keil.