Comment on Is SPI just "slow"?
nickwitha_k@lemmy.sdf.org 22 hours ago
Make sure that you are not writing one pixel per SPI transaction. The connection, whether HW SPI or bit banging, requires some time to open and close. This adds up quickly. Generally, is best to write a frame per transaction (or as close as possible) so that there are fewer open/close delays.
If you’re using an AVR based Arduino, you’ll likely need to optimize things if you want to do anything like animation so that as little CPU time as possible is used for anything but writing to the SPI bus and minimize blocking operations.
bvoigtlaender@feddit.org 12 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@lemmy.sdf.org 5 hours ago
You’re welcome!
That sounds like it could help.
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.