Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Arduino Simulide 1001. slow

2 posters

Go down  Message [Page 1 of 1]

1Arduino Simulide 1001. slow Empty Arduino Simulide 1001. slow Fri Dec 03, 2021 10:04 pm

Defran

Defran

SIMULIDE 1001 for Arduino. Many intersting improvements, but very very very very ... SLOW.



Last edited by arcachofo on Fri Dec 24, 2021 2:33 am; edited 1 time in total (Reason for editing : Marked as solved (green color))

2Arduino Simulide 1001. slow Empty Re: Arduino Simulide 1001. slow Fri Dec 03, 2021 11:50 pm

arcachofo

arcachofo

In general it should be faster, but depens on the case.

Can you provide an example that runs so slow?

3Arduino Simulide 1001. slow Empty Re: Arduino Simulide 1001. slow Sat Dec 04, 2021 1:55 pm

Defran

Defran

OK, Let me prepare it for You.
Attachments
Arduino Simulide 1001. slow AttachmentReloj_Esquematico.jpg
Esquema
You don't have permission to download attachments.
(44 Kb) Downloaded 1 times



Last edited by Defran on Sun Dec 05, 2021 1:27 pm; edited 3 times in total

4Arduino Simulide 1001. slow Empty Simuleide Arduino ver 1001. Too Slow Sun Dec 05, 2021 11:16 am

Defran

Defran

I attach the project files. In rality everything works. In the program *.ino it includes the RTC DS3231, so for Simulide only the menu part or setting the time works, enough to see the slowness. This same program is not slow in simulide 04159 for Arduino.
Attachments
Arduino Simulide 1001. slow AttachmentRELOJ_MATRIZ_SIMU.zip
Esquema Simulide
You don't have permission to download attachments.
(3 Kb) Downloaded 11 times
Arduino Simulide 1001. slow AttachmentReloj_Matriz_5_INO.zip
Programa
You don't have permission to download attachments.
(8 Kb) Downloaded 6 times
Arduino Simulide 1001. slow AttachmentReloj_Matriz_5_HEX.zip
Compilado
You don't have permission to download attachments.
(9 Kb) Downloaded 4 times



Last edited by Defran on Sun Dec 05, 2021 1:41 pm; edited 10 times in total (Reason for editing : ADDS)

5Arduino Simulide 1001. slow Empty Re: Arduino Simulide 1001. slow Tue Dec 07, 2021 1:34 am

arcachofo

arcachofo

Thanks.

For me the simulation runs at 100%, so the problem is not slow simulation.
Must be some problem whith the Arduino.
I will have a look.

6Arduino Simulide 1001. slow Empty Re: Arduino Simulide 1001. slow Wed Dec 08, 2021 2:30 am

arcachofo

arcachofo

The problem is about I2C.

Probably the fact that RTC DS3231 is not connected is blocking I2C communication.
Not sure if this is a bug or it is how it should work.

Do you have the real harware working?

Nice project btw.

7Arduino Simulide 1001. slow Empty Re: Arduino Simulide 1001. slow Thu Dec 09, 2021 11:33 am

Defran

Defran

Yes, REAL HARD woks OK, and this same program WORKS FINE TOO in Simulide 04159 for Arduino Nano and UNO. Tray it You in order to test it. I sended to You the total information: Schematic, pictures, etc. I do not think that the RTC affects because it does not woek even during the setting menu.

8Arduino Simulide 1001. slow Empty Re: Arduino Simulide 1001. slow Thu Dec 09, 2021 5:38 pm

arcachofo

arcachofo

The fact that the project works faster in 0.4.15 does not necessarily means that 0.4.15 simulation is correct.

I already tested it, and as I said in the previous post, the problem happens at I2C communication with RTC.
Most probably is a bug, but could happen that not having an RTC connected creates some delay.

So the question would be if the real hardware works the same without the RTC connected.

9Arduino Simulide 1001. slow Empty Re: Arduino Simulide 1001. slow Thu Dec 09, 2021 7:33 pm

Defran

Defran

The real hard works FAST with the RTC DICONNECTED from the moment of connection to the power supply.

If I remove the subrutine of RTC in the program, it continues run slow.
It makes sense, because the program only accesses to the RTC when exiting the time setting menu loop and the slowness can be senn in the loop without the presence or the subrutine of the RTC.

10Arduino Simulide 1001. slow Empty Re: Arduino Simulide 1001. slow Thu Dec 09, 2021 9:37 pm

arcachofo

arcachofo

The real hard works FAST with the RTC DICONNECTED from the moment of connection to the power supply
Nice to know.
This is definetly some issue with I2C simulation.

If I remove the subrutine of RTC in the program, it continues run slow.
If I remove all calls to RTC, including GetTemperature(), then the program run fast.

It makes sense, because the program only accesses to the RTC when exiting the time setting menu loop and the slowness can be senn in the loop without the presence or the subrutine of the RTC.
In void setup() function there is a call to GetTemperature() which accesses to the RTC.
In void loop() function, switch (systemState), case 0: there is a call to GetRtc() and another to GetTemperature().
Looks like systemState keeps at 0 until you press "Menu" button.

If I compile and run the sketch and don't touch any button:
It is doind a call to GetRtc() aproximately every 500 ms.
And continuous calls to GetTemperature().

That's what made me think about a delay caused by RTC not present.

The funy thing is that it slows down even accessing the RTC just once in setup function.
So when I2C is activated it slows down the execution of the firmware, but not the simulation itself.

11Arduino Simulide 1001. slow Empty Re: Arduino Simulide 1001. slow Thu Dec 09, 2021 11:01 pm

Defran

Defran

Well, If You finaly belive that the slowness is due to the RTC DS3231, I am waiting for it to be included as componnet as soon as posible and thak You very much for your attention. I keep encouraging you to improve such a good simulation tool as is Simulide, Thank you.

12Arduino Simulide 1001. slow Empty Re: Arduino Simulide 1001. slow Fri Dec 10, 2021 7:18 am

arcachofo

arcachofo

Well, If You finaly belive that the slowness is due to the RTC DS3231, I am waiting for it to be included as componnet as soon as posible
After you tested it in hardware and working ok, this hipotesis is discarded.
And that it slows down even accessing the RTC just once confirm that the problem is not the lack of the RTC.
This is definetly some issue with I2C simulation.

Anyway There is DS1307 already in development, and DS3231 probably will come soon as it is very similar.

13Arduino Simulide 1001. slow Empty Re: Arduino Simulide 1001. slow Fri Dec 10, 2021 8:12 am

Defran

Defran

RTC3231 Is the one with the most accuracy, that is why I use this one. DS1307 is outdated. Also the RTC3231 offers more physical options of size and connectivity.

14Arduino Simulide 1001. slow Empty Re: Arduino Simulide 1001. slow Thu Dec 23, 2021 10:02 am

arcachofo

arcachofo

And finally......... Issue solved at Rev 732.

15Arduino Simulide 1001. slow Empty Re: Arduino Simulide 1001. slow Thu Dec 23, 2021 10:59 am

Defran

Defran

Fine, Muchas Gracias.

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum