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

Add support for choosing BGR or RGB order on ST7735 enhancement #639

Closed
pkoevesdi opened this issue May 24, 2020 · 6 comments
Closed

Add support for choosing BGR or RGB order on ST7735 enhancement #639

pkoevesdi opened this issue May 24, 2020 · 6 comments

Comments

@pkoevesdi
Copy link

pkoevesdi commented May 24, 2020

I have ST7735 160x128 Display. My display has Red and Blue swapped.
The option TFT_RGB_ORDER in User_Setup.h has no influence.
Is there a workaround, until (hopefully) the option works for this Display too?

Thank You!

@pkoevesdi
Copy link
Author

pkoevesdi commented May 24, 2020

I was able to get the expected behaviour with adding

    tft.writecommand(TFT_MADCTL);
    tft.writedata(B11001100);

in front of my script. Thus, the script is not hardware agnostic anymore.

Btw., it's this piece of hardware:
https://joy-it.net/en/products/RB-TFT1.8

@pkoevesdi
Copy link
Author

pkoevesdi commented May 24, 2020

...but my workaround seems to get overwritten by any
tft.setRotation(#)
I think I understand, that tft.setRotation writes to the same register. But it doesn't keep the other bits set there, i.e. 03 für RGB order - so resets them back.

@Bodmer
Copy link
Owner

Bodmer commented May 24, 2020

These ST7725 displays come in a number of variants. The display setup used to be able to be determined by the color if the tab on the screen protection film but this is no longer the case. However the different variant options remain. I suspect that choosing a different color tab in the setup will correct the color swap.

In the longer term I will add making the RGB/BGR setting work for all displays to my future enhancement list.

@Bodmer
Copy link
Owner

Bodmer commented May 24, 2020

Setting options are here.

@pkoevesdi
Copy link
Author

pkoevesdi commented May 24, 2020

Sorry, I forgot to tell, that I tried all of them. The only one, that has no tray pixels at the edges is ST7735_GREENTAB2, but this (and most or all of the others too) have swapped colors.
And it's a ST7725R, if that matters. I read somewhere, that there exists also a initR() function for these, but seemingly not in this library. I don't know anyway, if that matters.

@Bodmer
Copy link
Owner

Bodmer commented Nov 2, 2020

Added support for choosing BGR or RGB order on ST7735 in version 2.3.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants