• I'm starting to use the ILI9341 LCD and thanks to the module its super easy. However the one problem is that this LCD is slow, and i know there isn't much we can do about it. I would like to know if there is any way to track pixels changed by drawString as i am writing things to the display i don't want to clear the whole screen as it just takes too long, so maybe if i can track the pixels changed by drawString i can just set those pixels to black instead of clearing the whole screen. Right now i just draw a rectangle over where i think the text will be but that still sets a lot of pixels that were already black and so just wasting time.

    I am aware the Espruino doesn't have much memory and so storing all the pixels for the screen in a buffer is just impractical/impossible so i just want to track those that have been changed by drawString.

    I think this is possible with a MAX7219 as it uses an array buffer then writes that to the display, but that isn't how it is with the ILI9341.

  • Yes, I'm afraid that the data can't be stored in Espruino - there's just not enough RAM. At the moment there isn't a way of storing the changed area - you'd have to keep track of it yourself (or perhaps call the same draw function again, but with the colour set to black).

    There is some work that could be done on Espruino (adding an SPI.write function with a count argument) that could really speed up ILI9341 - so hopefully some time soon I'll be able to implement that, and the write speed (especially for clears and fills) will take a huge jump.

  • I'd never thought of redrawing the same string but as black, that makes way more sense than setting a rect.

    Thanks Gordon.

  • You'd have to see what's faster... I'd have thought that a rect might be, but you never know.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Is it possible to keep track of pixels in the ILI9341 LCD?

Posted by Avatar for MrTimcakes @MrTimcakes

Actions