I am not sure if this is dispaly related or not:
What I see is if I dispaly 8 basic colors then
RED/Blue collors swapped
Yellow/Cyan swapped
Green, Magenta, Black and White are OK
If I remap codes in .h file then display shows basic colors correctly
Yellow is a combination of Red and Green
Cyan is combination of Blue and Green
It feels like Blue and Red pixels are swapped... Is it even possible?
I tried multiple examples - all giving me the same result.
Any Ideas?
Thanks
1.8" TFT LCD with black tab - swapped colors
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 11
- Joined: Sun Jan 27, 2013 2:29 pm
1.8" TFT LCD with black tab - swapped colors
Last edited by Andy_123 on Mon Apr 29, 2013 7:18 pm, edited 1 time in total.
-
- Posts: 11
- Joined: Sun Jan 27, 2013 2:29 pm
Re: 1.8" TFT LCD - incorrect (swapped) colors
I have suspision that hardware pin SRGB of ST7735 on my display is not set correctly
To invert it, I was able to clear RGB bit it in MADCTL register (ST7735.cpp file) and now it looks correct.
Any other ideas?
To invert it, I was able to clear RGB bit it in MADCTL register (ST7735.cpp file) and now it looks correct.
Any other ideas?
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: 1.8" TFT LCD - incorrect (swapped) colors
We stock 3 different 1.8" TFT devices. What is the product ID of the screen you have?
-
- Posts: 11
- Joined: Sun Jan 27, 2013 2:29 pm
Re: 1.8" TFT LCD - incorrect (swapped) colors
I just want to bring this thread back - it appears that black tab displays have RED and BLUE colors swapped and library was updated recently to address this.
It was done by swapping BLUE and RED colors before sending each pixel - from my tests that slows down dispaly dramatically
Also "if" check performed at runtime that takes extra time - if should be done at compiler level I guess.
The more efficient way is to clear RGB bit in then MADCTL register - this will automatically swap colors and no swapcolor() is necessary.
Here are simple changes:
Replace 0xC8 witt 0xC0:
Also remove all instances of MADCTL_RGB from setRotation
It was done by swapping BLUE and RED colors before sending each pixel - from my tests that slows down dispaly dramatically
Code: Select all
if (tabcolor == INITR_BLACKTAB) color = swapcolor(color);
The more efficient way is to clear RGB bit in then MADCTL register - this will automatically swap colors and no swapcolor() is necessary.
Here are simple changes:
Replace 0xC8 witt 0xC0:
Code: Select all
ST7735_MADCTL , 1 , // 14: Memory access control (directions), 1 arg:
0xC0, // row addr/col addr, bottom to top refresh
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: 1.8" TFT LCD with black tab - swapped colors
Thats right! thanks for the reminder, latest github library has this fix and supports all tab colors
-
- Posts: 1
- Joined: Mon Aug 26, 2013 8:13 am
Re: 1.8" TFT LCD with black tab - swapped colors
I have the same issue using the 1.8" LCD (ST7735R) with BeagleBone Black. BBB's running ArchlinuxARM, kernel 3.8.11.
I can load the 1.8" LCD's Device Tree file (cape-bone-adafruit-lcd-00A0.dts), and everything's fine, except the swapped colors. The LCD works with Arduino, using libraries provided by Ada, and it does not swap the colors. Thanks for any help!
I can load the 1.8" LCD's Device Tree file (cape-bone-adafruit-lcd-00A0.dts), and everything's fine, except the swapped colors. The LCD works with Arduino, using libraries provided by Ada, and it does not swap the colors. Thanks for any help!
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: 1.8" TFT LCD with black tab - swapped colors
That file is part of the Beagleboard kernel distribution. We don't support it here. You'll have to contact Beagleboard.
Please be positive and constructive with your questions and comments.