7 Replies Latest reply on Jul 19, 2016 9:31 AM by user_1377889

    UDB Counter values update

    user_212486942

      Hi Everyone,

         

      I am having trouble with a Counter, my program has an EEPROM memory from which it reads the values and updates the counter,

         

      I cant get the values to update.

         

      the counter triggers an interrupt with a compare value

         

      void update(){ 
          Counter_Stop();
           Counter_WritePeriod(revcount);
          Counter_WriteCompare(revcount);     
          Counter_WriteCounter(0); 

         

         Counter_SaveConfig();  
          Timer_WritePeriod(Period);  
          Timer_WriteCounter(Period); 
          Counter_Start();
          clr();screen();
      }