Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Can I use a MicroPython module on a CircuitPython board\proj
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Can I use a MicroPython module on a CircuitPython board\proj

by jasonchildress on Thu Oct 08, 2020 2:49 pm

I'd like to start a CircuitPython project but one of the modules I'd like to use is only available as a MicroPython library.
More specifically, I'd like to use the LVGL MicroPython port.

Is this possible? If so, are there any examples/projects that I can reference?
jasonchildress
 
Posts: 43
Joined: Fri Apr 19, 2013 11:47 am

Re: Can I use a MicroPython module on a CircuitPython board\

by tannewt on Thu Oct 08, 2020 4:01 pm

Unfortunately, we don't support LittleVGL in CircuitPython. Instead, we have our own `displayio` APIs: https://learn.adafruit.com/circuitpytho ... -displayio

tannewt
 
Posts: 1837
Joined: Thu Oct 06, 2016 8:48 pm

Re: Can I use a MicroPython module on a CircuitPython board\

by jasonchildress on Thu Oct 08, 2020 4:38 pm

Thanks for the reply, tannewt.

I have experimented with displayio in the past and out of all honestly I was not happy with the speed/responsiveness of it. Although this was using a PyPortal and I would like to use a Teensy 4.1 for this project. So maybe the faster Teensy would help out there?

Another question for you: My project is currently on Arduino and I'm using, an ILI9488 (this display) on a Teensy 4.1 with the ILI9488_t3 library which supports DMA. This combination has made running LVGL very fast and responsive. Are there any DMA supported CircuitPython drivers for the ILI9488 display that work on the Teensy? Doing a search didn't turn up anything that I could find. Also, correct me if I'm wrong, but is most\all CircuitPython DMA support only on the SAMD platforms?

Additionally, I'm going to need a lot of I/O pins which is another reason for going with the Teensy 4.1. The PyPortal devices seem to use up a lot of their IO of the display and other peripherals.
jasonchildress
 
Posts: 43
Joined: Fri Apr 19, 2013 11:47 am

Re: Can I use a MicroPython module on a CircuitPython board\

by tannewt on Fri Oct 09, 2020 1:59 pm

jasonchildress wrote:I have experimented with displayio in the past and out of all honestly I was not happy with the speed/responsiveness of it. Although this was using a PyPortal and I would like to use a Teensy 4.1 for this project. So maybe the faster Teensy would help out there?


The CPU speed may help speed up the pixel computation. What are you displaying on the screen? Performance can vary a lot with what you are doing.

jasonchildress wrote:Another question for you: My project is currently on Arduino and I'm using, an ILI9488 (this display) on a Teensy 4.1 with the ILI9488_t3 library which supports DMA. This combination has made running LVGL very fast and responsive. Are there any DMA supported CircuitPython drivers for the ILI9488 display that work on the Teensy? Doing a search didn't turn up anything that I could find. Also, correct me if I'm wrong, but is most\all CircuitPython DMA support only on the SAMD platforms?


Arduino will always be faster than CircuitPython when executing code because it can compile and optimize user code.

I'm not sure whether we are using DMA on the iMX to do the SPI transfer. The iMX port is very early and alpha still. (I have a pending PR to enable the DCache for example.)

jasonchildress wrote:Additionally, I'm going to need a lot of I/O pins which is another reason for going with the Teensy 4.1. The PyPortal devices seem to use up a lot of their IO of the display and other peripherals.


Yup, the PyPortal uses an 8 bit bus to talk to the display and isn't really designed to have a lot of extra IO broken out.


I'm not against someone adding LVGL support into CircuitPython. However, I don't like the approach of directly exposing the C calls that the MicroPython module took. I'd like to see a more object oriented API.

tannewt
 
Posts: 1837
Joined: Thu Oct 06, 2016 8:48 pm

Please be positive and constructive with your questions and comments.