pappersverk / inky

A library for managing Inky e-ink displays from Elixir.
Apache License 2.0
72 stars 11 forks source link

Experiment with higher SPI speeds #13

Open nyaray opened 5 years ago

nyaray commented 5 years ago

When looking at the Python library, I found this https://github.com/pimoroni/inky/issues/30 which indicates that we might be able to make things go a bit faster.

This can be done independently of any other on-going work as one could, for example, make the SPI speed be a config-parameter that defaults to the current value if not set, thus making any change backwards compatible.

lawik commented 5 years ago

Interesting. Now if only I knew what version of display I have..

nyaray commented 5 years ago

I have reached out to a Pimoroni developer regarding chipsets, in hopes of getting some information so we can figure this out.

lawik commented 5 years ago

Nice. Hope they're up for some sharing :)

lawik commented 5 years ago

You did a bunch of profiling for your new performance changes. Any good recommendations for attempting to profile this sort of thing? What did you end doing for measurements? I guess you didn't have to measure on-device since you were mostly processing data structures..

Axel-Jacobsen commented 4 years ago

Hello - Have you profiled at all at different SPI speeds? It looks like you are also using 448 kHz, so does this mean that you encounter issues when using the inky pHat at higher SCLK frequencies (say, 1 MHz)?

Cheers! :)

lawik commented 4 years ago

I think I tried a few variations but ended up settling on what was used in the original python library. Feel free to try some things and measure the results :)

Axel-Jacobsen commented 4 years ago

Thanks! Were there display issues?

I may be playing around with this relatively soon, I will report back my results!

lawik commented 4 years ago

I quite honestly don't recall :D

I believe during certain experiments there was blurriness from previous images. Not sure if that was was experimenting with speeds or with the blanking.

The biggest difference in update speed for me has been running the red inky configured as black. No color but much faster.

nyaray commented 4 years ago

You did a bunch of profiling for your new performance changes. Any good recommendations for attempting to profile this sort of thing? What did you end doing for measurements? I guess you didn't have to measure on-device since you were mostly processing data structures..

I think I just used the built-in timer in BEAM and created a simple utility for gathering tagging starts and stops of timers. I don't even recall how I did everything, hehe. I want to say that a fair bit of time was spent waiting for the hardware to run the cycles defined by the LUTs.