-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[display] Improved SSD1306, Support for SH1106 #627
Merged
salkinium
merged 2 commits into
modm-io:develop
from
TomSaw:support-sh1106-and-improve-ssd1306
May 7, 2021
Merged
[display] Improved SSD1306, Support for SH1106 #627
salkinium
merged 2 commits into
modm-io:develop
from
TomSaw:support-sh1106-and-improve-ssd1306
May 7, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cool. This think looks fine to me. Could you please review @salkinium !? |
salkinium
reviewed
May 5, 2021
TomSaw
force-pushed
the
support-sh1106-and-improve-ssd1306
branch
2 times, most recently
from
May 5, 2021 07:16
acc3df5
to
3b5bb94
Compare
TomSaw
changed the title
[display] Improve SSD1306, Support SH1106
[display] Improved MonochromeGraphicDisplay and SSD1306, Support for SH1106
May 5, 2021
TomSaw
force-pushed
the
support-sh1106-and-improve-ssd1306
branch
6 times, most recently
from
May 6, 2021 08:05
43e9c14
to
0b0332f
Compare
salkinium
approved these changes
May 6, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Perhaps split into two commits, one for the display changes and one for the driver code.
src/modm/ui/display/monochrome_graphic_display_vertical_impl.hpp
Outdated
Show resolved
Hide resolved
TomSaw
force-pushed
the
support-sh1106-and-improve-ssd1306
branch
from
May 7, 2021 09:31
0b0332f
to
beda25a
Compare
TomSaw
changed the title
[display] Improved MonochromeGraphicDisplay and SSD1306, Support for SH1106
[display] Improved SSD1306, Support for SH1106
May 7, 2021
Clean. if you're happy, merge pls! |
TomSaw
force-pushed
the
support-sh1106-and-improve-ssd1306
branch
2 times, most recently
from
May 7, 2021 11:12
e4b0461
to
31d9ba2
Compare
Ready to merge, sir! |
salkinium
force-pushed
the
support-sh1106-and-improve-ssd1306
branch
from
May 7, 2021 17:52
31d9ba2
to
7d7490d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support SH1106
Various SSD1306 Displays sold today do actually integrate the cheaper SH1106. This thing is said to be compatible with SSD1306 what's not 100% the case: SH1106 does only support Page MemoryMode. thus requires a different
writeDisplay()
routine than actually used for modm::Ssd1306.Current result using modm::Ssd1306 with SH1106 looks lke this
When sending a frame, one has to alternate between setting the incremented page-address and sending page-data.
However, SSD1306 can also be driven in
MemoryMode::PAGE
but would result in worse performance vs. transmitting the whole frame at once.Solutions
Sh1106
inheritingSsd1306
and override for the differences.MemoryMode
as template parameter toSsd1306
and specialize for the differences.Ssd1306_I2cWriteTransaction
as template parameter and handle the differences there.I've choosen 1. because:
Ssd1306
SSD1306
andSsd1306_I2cWriteTransaction
.MemoryMode::PAGE
due to worse performance. This excludes 2. and 3 additionallyImproved SSD1306
Structure
DataTranmissionAdapter
->Ssd1306_I2cWriteTransaction
for clarificationWriteData()
methodsPerformance
writeDisplay()
commandBuffer
could be halfedSsd1306_I2cWriteTransaction
Changes on MonochromeGraphicDisplay
Current layout of the
buffer
is not compatible with the memory of SH1106. For SH1106 we need the rows ( x-dimension) being ordered behind each other rather than the columns.SH1106 unfortunately offers no other options to adjust the mapping. Kindly Ssd1306 comes to meet these constraints and archieve max performance for both displays. We can switch from
MemoryMode::VERTICAL
->MemoryMode::HORIZONTAL
so both displays expect the rows in a line and the common ′buffer′s dimensions could be flipped.