Problem with DS3231

For general Flowcode discussion that does not belong in the other sections.
Post Reply
B2CAP-V6
Posts: 11
http://meble-kuchenne.info.pl
Joined: Fri Dec 04, 2020 2:15 pm
Been thanked: 5 times

Problem with DS3231

Post 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 68 times

medelec35
Matrix Staff
Posts: 1459
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 513 times
Been thanked: 473 times

Re: Problem with DS3231

Post 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.
Martin

B2CAP-V6
Posts: 11
Joined: Fri Dec 04, 2020 2:15 pm
Been thanked: 5 times

Re: Problem with DS3231

Post 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

medelec35
Matrix Staff
Posts: 1459
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 513 times
Been thanked: 473 times

Re: Problem with DS3231

Post 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?
Martin

B2CAP-V6
Posts: 11
Joined: Fri Dec 04, 2020 2:15 pm
Been thanked: 5 times

Re: Problem with DS3231

Post by B2CAP-V6 »

Yes, Martin, I would like your demo, please.
Luc

medelec35
Matrix Staff
Posts: 1459
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 513 times
Been thanked: 473 times

Re: Problem with DS3231

Post by medelec35 »

Sure,
here is a simulation only Demo.
Attachments
Display Demo.fcfx
(11.41 KiB) Downloaded 69 times
Martin

B2CAP-V6
Posts: 11
Joined: Fri Dec 04, 2020 2:15 pm
Been thanked: 5 times

Re: Problem with DS3231

Post 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

B2CAP-V6
Posts: 11
Joined: Fri Dec 04, 2020 2:15 pm
Been thanked: 5 times

Re: Problem with DS3231

Post by B2CAP-V6 »

Sorry, I forgot to specify that I understood the need to add the PrintString(" "), this avoids the ClearLine

medelec35
Matrix Staff
Posts: 1459
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 513 times
Been thanked: 473 times

Re: Problem with DS3231

Post 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.
Martin

Post Reply