Skip to main content
Visitor II
July 17, 2023
Solved

Stm8s003k3 temperature measurement

  • July 17, 2023
  • 1 reply
  • 2655 views

Hi  Everyone,

I am using Stm8s003k3 to measure the temperature of three different places. Then displaying each temperature on 3 digits 7-segment display (3 of them to show each temperature separately). Now to display the temperature on all 3 seven segments I need to put them in the main loop and then the code should be executed without delay otherwise it will Dim the displays. My problem is I need to perform calculations and some other tasks if do those there is a delay and so my display got Dim any solution recommended how do I display temperature on all three displays while performing other tasks as well?

 

    This topic has been closed for replies.
    Best answer by Michal Dudka

    I suppose that you have multiplexed display ( https://en.wikipedia.org/wiki/Multiplexed_display ). Setup timer to generate periodic interrupt (for example 1ms). Handle multiplexing in interrupt service routie. Then you can do anything in main loop without disturbing the display managment.

    1 reply

    Graduate II
    July 17, 2023

    I suppose that you have multiplexed display ( https://en.wikipedia.org/wiki/Multiplexed_display ). Setup timer to generate periodic interrupt (for example 1ms). Handle multiplexing in interrupt service routie. Then you can do anything in main loop without disturbing the display managment.

    KRiaz.1Author
    Visitor II
    August 17, 2023

    Hi Michal 
    First of all, thank you for the reply. I can do the basic coding right. is there any example or any exemplary code so that i can just lear how to create interrupts?