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
[โ€“] cmnybo@discuss.tchncs.de 11 points 2 days ago (1 children)

That display can run a maximum SPI clock speed of 15MHz. That's enough to update the full screen about 45 times a second when using RGB565 mode. If you are using an ATmega based Arduino, it's probably the CPU that's limiting your speed. Color graphics take a lot of processing power. Just make sure you're using hardware SPI and that the SPI clock is set as high as it will go without going over 15MHz.

[โ€“] bvoigtlaender@feddit.org 2 points 1 day ago

Thank you for your reply. Sorry for forgetting the most important part about my setup. The Controller i am using, it is a NORA-W106 on a Arduino Nano ESP32 and according to its docs it has a clock speed of up to 240MHz, so i guess that would be enough depending on if that's also base clock speed its running on right now...

NORA-W10 series modules have a dual-core system with two Harvard Architecture Xtensa LX7 CPUs operating at a maximum 240 MHz internal clock frequency.

Currently i set the SPI speed using SPI.setClockDivider(SPI_CLOCK_DIV2); Which would be 120MHz to my understanding assuming it runs at maximum speed. Too fast for SPI but that is not how it feels like. I will try some things out once i am back home especially as the method i use seems to be deprecated.