this post was submitted on 26 Jun 2025
8 points (100.0% liked)

Ask Electronics

3716 readers
3 users here now

For questions about component-level electronic circuits, tools and equipment.

Rules

1: Be nice.

2: Be on-topic (eg: Electronic, not electrical).

3: No commercial stuff, buying, selling or valuations.

4: Be safe.


founded 2 years ago
MODERATORS
 

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

EDIT: Thanks to jeinzi, nickwitha_k and cmnybo I have managed to bring the rendering time down from 2142ms to 80ms

you are viewing a single comment's thread
view the rest of the comments
[–] nickwitha_k@lemmy.sdf.org 2 points 1 day 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.