Page 1 of 1

Problem with DS3231

Posted: Tue Apr 05, 2022 7:21 am
by B2CAP-V6
Hello All,
I come to you because I have problems with the DS3231, it seems that I cannot communicate with it.
I am attaching an algorigram, if someone can help me, I don't understand what is happening.
I tried various solutions and it's always the same, I display anything.
Many thanks in advance for your help
Luc
Essai.fcfx
(140.26 KiB) Downloaded 134 times

Re: Problem with DS3231

Posted: Tue Apr 05, 2022 9:35 am
by medelec35
Hello.
I have just tested your project on a PIC18F46K22 and there are no issues with communication.
The DS3231 RTC is working as expected.
Have you checked that Flowcode is fully up-to-date?
When updating, I would recommend changing the Files in-use to Full database.
If it is fully updated, you must have a hardware issue.
Check the connections. for example, I have experienced O/C Dupont jumper wires in the past.
There are some issues with your project.
For example, the timer3 enable interrupt requires deleting otherwise you will get a compiler error since the macro it calls has been deleted.
The loop updating and displaying the RTC time is way too fast.
Perhaps have 100ms delay.
I don't recommend using LCD clear macros if constantly updating as you will get char flashing.
I would instead override the original numbers with the new numbers.
I Would recommend changing the properties of the RTC from Simulate Comms Yes to No.
If you do that, the simulation RTC time will match your PC time.

Re: Problem with DS3231

Posted: Tue Apr 05, 2022 10:35 am
by B2CAP-V6
Hello Martin,
A great thank you for your reply.
I'll modify and check as your recommendations.
About Flowcode, it is fully up-to-date (I checked soon this morning).
I don't understand: I would instead override the original numbers with the new numbers.
Luc

Re: Problem with DS3231

Posted: Tue Apr 05, 2022 10:57 am
by medelec35
If you remove the clear line or clear functions, then the new characters will be overwriting the old characters.
The only issue is if an old char data is 123
the new is just 4 then you will have 423 instead of just 4
In cases like that, you add a string on the end with a couple of spaces so the 23 is overwritten.
I can upload a demo if you like?

Re: Problem with DS3231

Posted: Tue Apr 05, 2022 12:42 pm
by B2CAP-V6
Yes, Martin, I would like your demo, please.
Luc

Re: Problem with DS3231

Posted: Tue Apr 05, 2022 2:29 pm
by medelec35
Sure,
here is a simulation only Demo.

Re: Problem with DS3231

Posted: Wed Apr 06, 2022 4:21 am
by B2CAP-V6
OK Martin,
A great thank you once again, the display is much better.
With all your advice, I will launch the manufacture of PCB, I will thus rule out the problems related to the connections and to be able to work on the flowchart. Then I will let you know the outcome.
BR
Luc

Re: Problem with DS3231

Posted: Wed Apr 06, 2022 4:35 am
by B2CAP-V6
Sorry, I forgot to specify that I understood the need to add the PrintString(" "), this avoids the ClearLine

Re: Problem with DS3231

Posted: Thu Apr 07, 2022 8:53 am
by medelec35
B2CAP-V6 wrote:
Wed Apr 06, 2022 4:35 am
Sorry, I forgot to specify that I understood the need to add the PrintString(" "), this avoids the ClearLine
That's brilliant.
At least all the flickering is eliminated.