This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Keil Compiler timer.h Include Function

The Microchip Atmega328 compiler provides a timer function, i.e. #include <Timerone.h>, which allows for simple delay coding such as delay (XXX) for millisecond delays or delayMicroseconds(XXX) for delays of microseconds. Does the Keil Compiler for the Silabs EFM8BB1 provide a timer.h function?

Parents
  • void DELAY_USEC(int){ // where XXXX requires tweaking for each time delay used
       for(i = 0; i < XXXX; i++);

    }

    void DELAY_MSEC(int){ // where XXXX & YYYY require tweaking for each time delay used
       for(i = 0; i < XXXX; i++);{
          for(j = 0; j < YYYY; j++);};
    }

    Based on testing using the EFM8BB1LCK, the above delay methods provide very limited utility compared to the typical timer library functions of most compilers.

Reply
  • void DELAY_USEC(int){ // where XXXX requires tweaking for each time delay used
       for(i = 0; i < XXXX; i++);

    }

    void DELAY_MSEC(int){ // where XXXX & YYYY require tweaking for each time delay used
       for(i = 0; i < XXXX; i++);{
          for(j = 0; j < YYYY; j++);};
    }

    Based on testing using the EFM8BB1LCK, the above delay methods provide very limited utility compared to the typical timer library functions of most compilers.

Children