Hi
Not got access to FC just now to see your chart and I'm unsure how you are multiplexing but perhaps when in the macro that is adjusting the digit you could pulse the common pin?
Maybe something along the lines of using "x" as the variable to control the output pin, being 0 or 1.
Set an interrupt on a timer say for 600mS (or whatever) enabled when in the required macro, disabled when leaving. In the ISR have a calculation.
x = ! x (x = not x, changing between values every 600mS)
In your multiplex, check the value of x when it comes time to refresh the digit of interest and if 0 don't refresh.
Just a thought and without access to the chart I'm unsure how practical it may be.
Regards
Sensor DS18B20
-
- Valued Contributor
- Posts: 1528
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Sensor DS18B20
Gracias por la respuesta, me ha servido de mucho.chipfryer27 wrote: ↑Sat Mar 22, 2025 5:24 pmHi
Not got access to FC just now to see your chart and I'm unsure how you are multiplexing but perhaps when in the macro that is adjusting the digit you could pulse the common pin?
Maybe something along the lines of using "x" as the variable to control the output pin, being 0 or 1.
Set an interrupt on a timer say for 600mS (or whatever) enabled when in the required macro, disabled when leaving. In the ISR have a calculation.
x = ! x (x = not x, changing between values every 600mS)
In your multiplex, check the value of x when it comes time to refresh the digit of interest and if 0 don't refresh.
Just a thought and without access to the chart I'm unsure how practical it may be.
Regards
He implementado unas condiciones dentro de la rutina de multiplexado que se cumplen cada cierto tiempo dado por el TMR1.
En concreto han sido 3 una para las centenas, otra para las decenas y otra para las unidades.
Ahora todo funciona bien.
C.
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Sensor DS18B20
Thank you very much for all the help provided !!!!!chipfryer27 wrote: ↑Sun Mar 23, 2025 10:01 pmHi
Glad it is working and happy to have been of some help.
Regards
C.
Re: Sensor DS18B20
I have the project finished and tested working perfectly.
But I wanted to make a modification by adding a new interruption but it won't let me select the type of interruption to insert (TMR1)
What could it be due to?
Attached to the file
C.
But I wanted to make a modification by adding a new interruption but it won't let me select the type of interruption to insert (TMR1)
What could it be due to?
Attached to the file
C.
- Attachments
-
- Termostato_Test.fcfx
- (148.71 KiB) Downloaded 10 times
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Sensor DS18B20
Hi
I have just added in "Main", an Interrupt Icon and could select Tmr1. This then compiled without issue.
You have many macros in your chart and it isn't possible to go through every one, so if you could be more specific as to where you are placing, maybe that would help narrow it down.
Your chip also has a Timer0 and Timer2 interrupts. Could they help?
Regards
I have just added in "Main", an Interrupt Icon and could select Tmr1. This then compiled without issue.
You have many macros in your chart and it isn't possible to go through every one, so if you could be more specific as to where you are placing, maybe that would help narrow it down.
Your chip also has a Timer0 and Timer2 interrupts. Could they help?
Regards
Re: Sensor DS18B20
Gracias por la respuesta.
Quería añadirlo dentro del main, justo detrás de la interrupción delRB0.
Se abre la ventana de configuración pero no me permite elegir ningún tipo de interrupción.
C.
Quería añadirlo dentro del main, justo detrás de la interrupción delRB0.
Se abre la ventana de configuración pero no me permite elegir ningún tipo de interrupción.
C.