Hi, hope this post is fine in regard of rule 2.

Currently doing some fun stuff with an Arduino and have it hooked up to an 128x160px and communicate with it over SPI. If i color in all 20480 pixels it takes about 2 seconds to be done and i can watch the rows change one after another.

I was wondering if there are some tricks to speed this process up a bit or does it really just come down to minimizing the pixels to be changed?

The module im using is this one: https://www.waveshare.com/wiki/1.8inch_LCD_Module

Here is also my current code if anybody cares to take a look, even though i just rewrote the example code more or less so i would understand it. https://codeberg.org/bvoigtlaender/open-phone/src/branch/main

  • Bjarne@feddit.orgOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    15 hours ago

    Thank you for your input. That does sound reasonable, currently i am closing and opening for each pixel i am setting. However the example code mine is based on also implemented away to set the cursor on an area. And i can then probably just provide more bytes than just two here. I will try this out later!

    I don’t think mine is AVR based. It is the architecture of the CPU right? The datasheet says it has two Harvard Architecture Xtensa LX7 CPUs

    • nickwitha_k (he/him)@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      7 hours ago

      You’re welcome!

      However the example code mine is based on also implemented away to set the cursor on an area. And i can then probably just provide more bytes than just two here. I will try this out later!

      That sounds like it could help.

      I don’t think mine is AVR based. It is the architecture of the CPU right? The datasheet says it has two Harvard Architecture Xtensa LX7 CPUs

      Ok. That means that you definitely should be able to get more performance out of an SPI display. If you’re able to access both cores, you could likely improve performance by dedicating one to communicating with the display, which, if the display supports it, may be able to effectively eliminate the connection setup/teardown as a factor.