I made a minimalistic mandelbrot rendering on ODROID GO:
https://gist.github.com/jedie/6d68e033a ... 8aa7ea46f0
How to optimize this?!?
I call tft.pixel(x, y, color) ... so every pixel are always show immediately.
How to put a complete line into a buffer?
optimize LoBo TFT access...
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: optimize LoBo TFT access...
I did put in a feature request to Lobo to add that I can write a buffer from RAM to the screen window but as far as I am aware this hasn't been implemented.
It is probably possible to use the low level methods as a work around.
if you used Memory Write (2Ch) as cmd and then had a bytearray with your pixel data as the data
i.e something like this
It is probably possible to use the low level methods as a work around.
Code: Select all
tft.tft_writecmddata(cmd, data)
i.e something like this
Code: Select all
#create a bytearray to hold 1 line (320 pixels * 2 bytes per pixel) of pixel data
data = bytearray(320 *2)
#add code to fill the bytearray with the needed data
#send the data to the screen RAM
tft.tft_writecmddata(0x2C, data)
Re: optimize LoBo TFT access...
I didn't forget about it, it is in my work queue (which. I'm afraid, is not of a FIFO type).OutoftheBOTS_ wrote: ↑Fri Oct 19, 2018 8:19 pmI did put in a feature request to Lobo to add that I can write a buffer from RAM to the screen window but as far as I am aware this hasn't been implemented.
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: optimize LoBo TFT access...
Lobo if I used the above work around that I mentioned would this use DMA to transfer the bytearray??loboris wrote: ↑Fri Oct 19, 2018 9:38 pmI didn't forget about it, it is in my work queue (which. I'm afraid, is not of a FIFO type).OutoftheBOTS_ wrote: ↑Fri Oct 19, 2018 8:19 pmI did put in a feature request to Lobo to add that I can write a buffer from RAM to the screen window but as far as I am aware this hasn't been implemented.
Re: optimize LoBo TFT access...
tft.tft_writecmddata() does not use DMA for transfer. But it uses a very efficient routine, writing directly to SPI hardware and the transfer speed is practically the same as with DMA.OutoftheBOTS_ wrote: ↑Fri Oct 19, 2018 10:15 pmLobo if I used the above work around that I mentioned would this use DMA to transfer the bytearray??
In case the buffer is in in external SPI-RAM (psRAM), it can be even faster, as DMA cannot transfer from external RAM, and data has to be coiped into internal RAM.