Implementing SENT Interface in MicroPython?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Implementing SENT Interface in MicroPython?

Post by Roberthh » Mon Jun 21, 2021 11:12 am

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.

User avatar
sailorXY
Posts: 6
Joined: Mon Jun 14, 2021 11:53 am
Location: Near Potsdam (Germany)

Re: Implementing SENT Interface in MicroPython?

Post by sailorXY » Wed Jun 30, 2021 9:36 am

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

Post Reply