No announcement yet.

uLCD-32pt Timer

  • Filter
  • Time
  • Show
Clear All
new posts

  • uLCD-32pt Timer


    I am trying to figure out how to use the Sys_timer to display a clock, but I haven't quite figured out how to use it for my implementation. (Using GFX).

    I have a bunch of gauges constantly updating with values read in serially, and I want to have the timer displaying and updating continuously (eg. as an interrupt) with an elapsed time as the gauge values are updated.

    Does anybody know how this can be done?
    Any help is much appreciated!

  • #2

    By disecting the example program here:-

    It should help to pave the way to what you need.


    • #3

      Thanks. I managed to get use the TIMER3 example and incorporate that into my code. The only thing is, I am not quite sure how to get the timer to update every one second, non-blocking. Looking at the TIMER3 event, I'm not sure how to change the speed at which the timer increments. Currently, I am just using a pause(1000) in the repeat loop of the main(). However, this is not non-blocking and will affect the rest of my program.

      Is there another way of adjusting the speed?

      Thanks in advance.


      • #4

        sys_SetTimer(TIMER3,1000); to start and in your timer 3 event

        The event will then happen every second
        Do anything you need to do after reseting the timer and you are good to go