AnsweredAssumed Answered

In K10 microcontroller how can we get a real time delay like delayms(100) or delayus(100) for 100 ms and 100 us delay?

Question asked by Prafful Sagar jhawer on Nov 16, 2015
Latest reply on Nov 25, 2015 by Prafful Sagar jhawer

Hi All,

I'm using an MK10DX128VLH5 IC in my project. I want to give a delay of exactly 3 secs in between 2 operations. Is there an inbuilt function or something that can give me this exact delay??.

Meanwhile if u guys can help me with the amount of delay the followingfunction gives when run, it would help me solve the issue more easier. The following code is already used in an existing code which i need to change for an upgraded product.

 

Delay_t(20000);

 

void Delay_t(unsigned int i){

  int k;

while(i--){

    for(k=0;k<10;k++){ 

  asm ("NOP");

    }

  }

}

 

The CPU Configuration is as follows:

Please help ASAP. Plz let me know if any other information is required..

 

 

Thanks in advance,

Prafful

Outcomes