34 views
in Platform Packages by
Hello All!

I am using a Raspberry Pi model 3A+ for a project and I am having some timing issues. Basically I need to make an accurate stopwatch to 1/100th of a second, but when I set the timer to pulse every 10ms it is not even close.

How does EW know what clock speed the processor is running at? I have also just purchased a Real Time Clock specifically for a Raspberry Pi which works through i2c and has its own python code, but I'm not sure how to implement this within Embedded wizard.

Even without the Real Time Clock, does anyone know why my timer accuracy is over 25% out?

Hope you guys can help.

Regards, Jono

2 Answers

0 votes
by
Hi again,

On another note, I noticed that if I change the timer from 10ms to 100ms, I have a pretty accurate timer (obviously only 0.1sec resolution though)

Regards, Jono
0 votes
by

Hi Jono,

according to your description I assume that you try to use a Timer within your GUI application to create a stopwatch with millisecond accuracy. Please note, that expiring timers are processed within the GUI update cycle, the so called main loop.

Timer objects within Embedded Wizard are intended to be used for GUI animations to trigger a certain action after a desired time period. These are not realized by separate hardware timers.

In order to access time functions from the standard C library or from your own API you can use native code within your GUI project.

Best regards,

Manfred.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...