Page 2 of 2

Re: Implementing SENT Interface in MicroPython?

Posted: Mon Jun 21, 2021 11:12 am
by Roberthh
I forgot to mention that you can try to use viper code. This is compiled Python code and runs at about half the speed of pure assembly. In viper, you can create direct memory pointers. So you do not have to use the machine.memxx methods, which are slow.
And yes, you can extend the fiirmware with your own modules. There is also the option of writing C-level mpy modules which are executed by the firmware. I never did that, but it intended to add C-Level code to MicroPython without the need to change the firmware. Kind of dynamic linking.

Re: Implementing SENT Interface in MicroPython?

Posted: Wed Jun 30, 2021 9:36 am
by sailorXY
Hi Roberthh,

I also tried now the Viper Code emitter. The minimal reachable low time is now 4,4µs... So also not sufficiant.

Meanwhile I switched to C-Implementation. Here I could reach the tick time - even below 3µs with timer interrupt programming.

Thanx for your support and for the example code. It was a great help - also for the C-Code ;-)

regards
Mario