How to delay until a next increment of time occurs ?
Dietmar Schwertberger
maillist at schwertberger.de
Wed Nov 13 16:26:25 EST 2019
On 13.11.2019 21:20, R.Wieser wrote:
>> 300us is getting on towards realtime.
> Not really. Translated to a frequency (toggeling the pin) it would be just
> 1.6 KHz. Thats rather slow for an ARM machine running on 1.4 Ghz (about a
> million times as fast).
It *is* real-time...
Real-time is not about speed, but about guaranteed timing.
> Not possible: the 300 uSec is the basic timing, but the pin isn't always
> changed on every tick of it (the result is a code train).
With Micropython I did successfully use timer and DMA to accomplish
something like that (in the 100ns range, though). With a mainloop and
delays you can't guarantee to meet your requirements, at least not on a
multitasking non-realtime system.
Regards,
Dietmar
More information about the Python-list
mailing list