My contribution to the fledgling Pico MicroPython demo scene.
https://youtu.be/8gQgXbVStIs
Filled Triangle
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Filled Triangle
Nice. It would be interesting to know what display hardware and driver you're using.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Filled Triangle
The hardware is the Waveshare Pico Eval Board.
https://www.waveshare.com/product/raspb ... -board.htm
It's 480×320 pixels using a ILI9488/XPT2046 controller but I'm only using 240x240. The software driver is essentially the Waveshare MicroPython example code. There is a 40Mhz-ish SPI write of the 115,200 bytes of the bytearray - all standard stuff. The example shows 60Mhz but the throughput doesn't change past the 40's.
The fast part is indexing through the whole bytearray every frame reading from a color array. Interestingly writing to the display (even continuously sending a blank screen) is much slower than the all the triangle and color writing stuff.
I would love more RAM so I could write to one screen and send a copy to the display at the same time. (Hmm, I'll try that with a smaller array and see how fast I can get it...) Also, with more RAM I can have a framebuffer for the whole 480x320 although I think I'd be pushing the SPI write at that point.
Sam
https://www.waveshare.com/product/raspb ... -board.htm
It's 480×320 pixels using a ILI9488/XPT2046 controller but I'm only using 240x240. The software driver is essentially the Waveshare MicroPython example code. There is a 40Mhz-ish SPI write of the 115,200 bytes of the bytearray - all standard stuff. The example shows 60Mhz but the throughput doesn't change past the 40's.
The fast part is indexing through the whole bytearray every frame reading from a color array. Interestingly writing to the display (even continuously sending a blank screen) is much slower than the all the triangle and color writing stuff.
I would love more RAM so I could write to one screen and send a copy to the display at the same time. (Hmm, I'll try that with a smaller array and see how fast I can get it...) Also, with more RAM I can have a framebuffer for the whole 480x320 although I think I'd be pushing the SPI write at that point.
Sam
Re: Filled Triangle
Oops, I misspoke. I double checked and the screen coloring, not the SPI write does take up most of the resources. The whole demo runs at 7 FPS and if i remove the color stuff I get 25 FPS. The maximum possible FPS at 240x240 measured by timing the SPI write is 28 FPS. Regardless, it still irks me that the SPI seems to 'work' up to about 62Mhz but there is no performance improvement above 30-something Mhz.
Sam
Sam