Page 2 of 2

Re: DS18B20 component not working on FC10?

Posted: Fri Apr 11, 2025 5:24 pm
by Carmelo
I have been trying to see and find why this flickering of reading value happens.
I have come to the conclusion that it occurs when I want to take a second (and subsequent) sensor readings.
I attach a copy of the example where within the while I have placed a statement so that a single reading is produced and that value is then displayed indefinitely. The value is always shown constant.
The next step has been to enable the blocks within the condition so that the temperature value is repeated indefinitely, with the result that this is where the flashing of the displays begins.

Can you tell me any way on how to implement that this flickering does not occur for successive readings?

My opinion is that I think it is the block: SampleAllDevice (Perform temperature conversion - wait for completion)

Re: DS18B20 component not working on FC10?

Posted: Fri Apr 11, 2025 5:44 pm
by Carmelo
I have changed the variable: wait for completion to =0 and now the blinking is much faster, because I estimate that now it is not waiting to perform the conversion.
But still, I understand that I shouldn't work this way.

Re: DS18B20 component not working on FC10?

Posted: Sat Apr 12, 2025 9:59 am
by mnfisher
You would be better to use an interrupt (timer) to drive the display multiplex. Every time the main loop does something it delays the refresh - causing the flashing. Then the main program can read the temperature and update the value as required (say every minute or more often if required)


Martin

Re: DS18B20 component not working on FC10?

Posted: Sat Apr 12, 2025 7:59 pm
by Carmelo
Gracias por la respuesta.
Intentaré realizar lo indicado y expondré el resultado obtenido.

C.

Re: DS18B20 component not working on FC10?

Posted: Wed Apr 16, 2025 6:55 pm
by Carmelo
mnfisher wrote:
Sat Apr 12, 2025 9:59 am
You would be better to use an interrupt (timer) to drive the display multiplex. Every time the main loop does something it delays the refresh - causing the flashing. Then the main program can read the temperature and update the value as required (say every minute or more often if required)

Martin
Following your advice, I have implemented interrupt-controlled multiplexing and it works perfectly.
Now I can read the temperature value of the NTC in the period of time I want and the reading is perfectly stable.

Thank you very much for the advice.

Carmelo

Re: DS18B20 component not working on FC10?

Posted: Wed Apr 16, 2025 8:19 pm
by mnfisher
Good news - glad it's working well for you....

Martin