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
Problem with DS3231
-
- Posts: 11
- http://meble-kuchenne.info.pl
- Joined: Fri Dec 04, 2020 2:15 pm
- Been thanked: 5 times
-
- Matrix Staff
- Posts: 1921
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 623 times
- Been thanked: 645 times
Re: Problem with DS3231
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.
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
Re: Problem with DS3231
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
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
-
- Matrix Staff
- Posts: 1921
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 623 times
- Been thanked: 645 times
Re: Problem with DS3231
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?
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
-
- Matrix Staff
- Posts: 1921
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 623 times
- Been thanked: 645 times
Re: Problem with DS3231
Sure,
here is a simulation only Demo.
here is a simulation only Demo.
- Attachments
-
- Display Demo.fcfx
- (11.41 KiB) Downloaded 100 times
Martin
Re: Problem with DS3231
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
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
Sorry, I forgot to specify that I understood the need to add the PrintString(" "), this avoids the ClearLine
-
- Matrix Staff
- Posts: 1921
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 623 times
- Been thanked: 645 times