Jump to content


  • Content Count

  • Joined

  • Last visited

Reputation Activity

  1. Like
    Nicu got a reaction from Fmilburn in Energia millis() and micros() issues   
    I have just managed to upload my first Energia code to the c2000 LaunchPad I have bought about 6 months ago (got a little help on TI forums). BTW, if anyone has issues with that on OS X, I can share my limited experience.
    So I used this test for millis() and micros() that were not sufficiently precise on MSP430 (micros() would detect only a half millisecond at a time). To my surprise, the faster high end c2000 only has a resolution of 13 ms (that is, 13 000 us). Is that a limitation of the chip(s) or simply some error in Energia's libraries?
    I get plenty of zeros and a 13 from time to time with the code below, in the middle of the line, so it's not the serial communication that delays reads.
    Thanks in advance for any help.
    int size = 80;
    unsigned long ms[80];   void setup() {   Serial.begin(9600); }   void loop() {   for(int i = 0; i < size; i++) {     ms = millis();     delay(1);   }        for(int i = 1; i < size; i++) {     Serial.print(ms - ms[i - 1]);     Serial.print(" ");   }      Serial.println(); }
  • Create New...