Page 2 of 2
Re: Sensor DS18B20
Posted: Sat Mar 22, 2025 5:24 pm
by chipfryer27
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
Re: Sensor DS18B20
Posted: Sun Mar 23, 2025 8:58 pm
by Carmelo
chipfryer27 wrote: ↑Sat Mar 22, 2025 5:24 pm
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
Gracias por la respuesta, me ha servido de mucho.
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.
Re: Sensor DS18B20
Posted: Sun Mar 23, 2025 10:01 pm
by chipfryer27
Hi
Glad it is working and happy to have been of some help.
Regards
Re: Sensor DS18B20
Posted: Mon Mar 24, 2025 7:19 pm
by Carmelo
chipfryer27 wrote: ↑Sun Mar 23, 2025 10:01 pm
Hi
Glad it is working and happy to have been of some help.
Regards
Thank you very much for all the help provided !!!!!
C.
Re: Sensor DS18B20
Posted: Tue Mar 25, 2025 7:17 pm
by Carmelo
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.
Re: Sensor DS18B20
Posted: Tue Mar 25, 2025 7:48 pm
by chipfryer27
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
Re: Sensor DS18B20
Posted: Tue Mar 25, 2025 9:10 pm
by Carmelo
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.
Re: Sensor DS18B20
Posted: Tue Mar 25, 2025 9:27 pm
by Carmelo
I closed Flowcode completely and when I run it again it works fine again.
I don't know what could have happened.
Thank you for taking the trouble to review it.
C.