Skip to content
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

Constructor for EA OLEDS102-6 #1493

Closed
FrankX0 opened this issue May 14, 2021 · 6 comments
Closed

Constructor for EA OLEDS102-6 #1493

FrankX0 opened this issue May 14, 2021 · 6 comments
Milestone

Comments

@FrankX0
Copy link

FrankX0 commented May 14, 2021

I am implementing a constructor for an OLED display from EA (OLEDS102-6).
It works fine, except for the first 2 vertical lines: they seem to get overwritten.

This display has a resolution of 102x64.
The internal buffer starts at 13.
In display_info is use:

  /* tile_width = */ 13,  /* width of 13*8=104 pixel */
  /* tile_hight = */ 8,
  /* default_x_offset = */ 13, 
  /* flipmode_x_offset = */ 0,
  /* pixel_width = */ 102,
  /* pixel_height = */ 64

The issue seems to be in the tile_width.
If I set it to 12, the display is not fully updated.
If I set it to 13, the extra bits (104 - 102) seem to wrap-around to the beginning, overwriting the first 2 bits.

How can I solve this?
Thanks in advance for your help.

@FrankX0
Copy link
Author

FrankX0 commented May 14, 2021

I think I just found a solution/workaround.
The column address in the SSD1309 is initialised from 13 to 114.
If I add 2 bits to the upper address (116), the wrap-around is gone (they are still being written, but are not mapped to the actual display).

Would this be a valid solution?

@olikraus
Copy link
Owner

I am confused. Your display should be a SSD1306.
tile_width should be set to 13, pixel_width to 102, however this will just ensure that the high level procedures write to the visible area. It is the responsibility of your transfer procedure not to exceed those limits.

This could look like this:

if ( c + x > 132u )
{
c = 132u;
c -= x;
}
do
{
u8x8_cad_SendData(u8x8, c, ptr); /* note: SendData can not handle more than 255 bytes */
arg_int--;
} while( arg_int > 0 );

@FrankX0
Copy link
Author

FrankX0 commented May 16, 2021

Thanks Oli! I will implement like suggested.

@FrankX0 FrankX0 closed this as completed May 16, 2021
@olikraus
Copy link
Owner

thanks for pr #1497 , but it can not be merged directly.
Part of the files are created automatically.

@olikraus olikraus reopened this May 24, 2021
@olikraus olikraus added this to the 2.29 milestone May 24, 2021
@olikraus
Copy link
Owner

olikraus commented Sep 2, 2021

According to my research, this seems to be a SSD1306 so I will change the name for it.
Nevertheless, I will probably add this to the SSD1309 file as suggested in the PR

olikraus added a commit that referenced this issue Sep 2, 2021
olikraus added a commit that referenced this issue Sep 2, 2021
olikraus added a commit that referenced this issue Sep 2, 2021
olikraus added a commit that referenced this issue Sep 2, 2021
@olikraus
Copy link
Owner

olikraus commented Sep 2, 2021

The constructor is now called U8G2_SSD1306_102X64_EA_OLEDS102

Thanks for the contribution.

@olikraus olikraus closed this as completed Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants