-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
New display procedure for graphic screens (non 8x8) [SED1520/SBN1661] #324
Comments
All displays are based on the 8x8 code. |
Thanks for your quick response. It seems to be an SED1520-equivalent with 2 enable lines (see Similar datasheet) Since there are not enough pins on the ESP-12 to directly support the 6800-bus, I'm forced to use a 16-bit I/O expander (currently a MCP23017). . My understanding of your library is, that a display that is used only for text, starts with U8x8, and do not need to use a full buffer, while display that is used for graphics, starts with U8g2, and requires a full buffer. |
From outside it seems that there are two libraries (u8x8 and u8g2). However it is more like this: U8g2 is based on u8x8, I mean u8g2 extends u8x8 by added buffer procedures and high level graphics procedures. For the SED1520: I have not implemented this, because it requires a complete new interface (because of the two enable lines). So the effort would be more than just adding a new display. What i will not do, is supporting an additional I/O expander. However you can find some hints in the Arduino Forum on this. I think someone did this for a KS0108 display. All in all, adding support for SED1520 will be a good amount of effort for both of us. Are you really sure, that you want to use a SED1520 display? For example ST7920 displays are also very cheap and support SPI interface (3 I/O lines). |
If the SED1520 must be used then maybe it might be easier to use a library that already supports it. Possibly the one at http://en.radzio.dxp.pl/sed1520/ |
Aha, it is slowly getting clearer for me now. But maybe it looks too simple for me now. Do I need, besides a proper setup/initialization, more than a reimplementation for U8X8_MSG_DISPLAY_DRAW_TILE? Which can be expected to be more complicated due to the 2 enable lines, and the I/O-expander. (@RudyFiero) Wouldn't it be great if one could use an already familiar library, with a lot of features, for all his displays? |
sadly, I have also been researching this. I have a device which i have reverse engineered and attempting to repurpose, which has 240x160 screen, using ST7586S controller. |
Library Support U8g2 Software Architecture U8g2 software abstraction layers are:
Any of these layers can be implemented/exchanged almost independently. So the problem of supporting the SED1520 with port expanders can be split into two problems:
The u8g2 software architecture (starting with the u8x8 layer) is documented here: Port Expander https://github.com/olikraus/u8g2/wiki/Porting-to-new-MCU-platform I also gave some advice on port expanders here #256 : The suggestion is to just extend the extisting Arduino GPIO and Delay procedure by adding support to a port expander by modifing the Arduino Code. SED1520 Odd controller dram pixel patterns Example 2: The UC1610 does not include a monochrome mode, so u8g2 has to convert the b/w pattern into a graylevel pixmap. This is done here: @zerog2k If you want more discussions on the ST7586, better create a new issue for this. |
I've managed to get my screen working! I took one of ks0108 displays as a template, adjusted the parameters (size, and tiles), and add the code to write a complete line inside While writing this, I slowly understood more of the original code, and how ingenious the original code for the ks0108 was setup. So that probably answers the original question for me. Things that could be done to make the code nicer.
Somehow I cannot attach the code as a file, so here it is:
|
Thanks for. I will try to add support for this display with the next release. Your code will definitely help. |
KS0108 can not be used --> new com procedure created |
implemented... Beta release: https://github.com/olikraus/U8g2_Arduino/archive/master.zip |
Is there an example of how to implement a new non 8x8 display. Or is this the same as the example for an 8x8 display, as shown on the wiki? New Display Procedure
The text was updated successfully, but these errors were encountered: