SSD1306 OLED commands and operations + screen scrolling transition #951
alvinhochun
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @Ralim, this is for you:
I'm trying to understand the OLED control a little bit better. I'm referring to the 96x16 display module datasheet on the PINE64 wiki and this SSD1306 datasheet.
REFRESH_COMMANDS
data. Is this correct?Seems to me that this can be replaced by aActually, it doesn't look clearer at all...struct
with the same memory layout so that the command values can be modified directly instead of using byte array indexing. Do you think this makes sense?If I want to implement vertical scroll (RE make menu even clearer by using more animations #892), does it make sense to
send 4 pages of data (i.e. 2 screens) to the OLED anduse the "Set Display Offset (0xD3
)" to perform the scrolling? Because animating vertically by manipulating the framebuffer involves a lot of bit shift operations and that's probably not very nice.Obviously, sending 2 screens means it will take double the amount of time to write the OLED data.Wait, actually I don't need to send two screens, I can just increase the "page start" and "page end" addresses by 2 and write the framebuffer there instead, because the old screen data is already in the OLED RAM and I don't need to resend it. It looks like this should work nicely, right?
Addendum: Implemented in Impl. menu item scroll down animation #952
Thinking of ways to do the horizontal scrolling without needing to
memcpy
the whole framebuffer on each frame, but there doesn't look like to be a way to directly set the current column address. (If I can directly change the column address, then I only need to update one column, i.e. two bytes, per frame.)There is a hardware horizontal scrolling function, but it doesn't look like it can be applied here.
(I guess there isn't really any need to accelerate the horizontal scroll anyway...)
Beta Was this translation helpful? Give feedback.
All reactions