Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4923

Delay are wrong in 16F18877

$
0
0
Hi,
Have my running code, but it seems that delay_ms is off,.
Delays will last around 4 times more that i select,

Code (C):
  1.  
  2. if (!KN2)  //(knap2==1)  // Set time/date
  3.          {
  4.              inaktiv=0; //
  5.        
  6.                int p;
  7.                 p=0;
  8.              while (p<10)    // repeat until 100*10 = 1 SEC ???
  9.              {
  10.                 __delay_ms(100);
  11.                 p++;
  12.              }
  13.                  if (!KN2) // if stilled pressed after 1 sec.
  14.                  {...
Delay are wrong in 16F18877

Viewing all articles
Browse latest Browse all 4923

Trending Articles