1.8" TFT LCD with black tab - swapped colors

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
Andy_123
 
Posts: 11
Joined: Sun Jan 27, 2013 2:29 pm

1.8" TFT LCD with black tab - swapped colors

Post by Andy_123 »

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
Last edited by Andy_123 on Mon Apr 29, 2013 7:18 pm, edited 1 time in total.

Andy_123
 
Posts: 11
Joined: Sun Jan 27, 2013 2:29 pm

Re: 1.8" TFT LCD - incorrect (swapped) colors

Post by Andy_123 »

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?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: 1.8" TFT LCD - incorrect (swapped) colors

Post by adafruit_support_rick »

We stock 3 different 1.8" TFT devices. What is the product ID of the screen you have?

Andy_123
 
Posts: 11
Joined: Sun Jan 27, 2013 2:29 pm

Re: 1.8" TFT LCD - incorrect (swapped) colors

Post by Andy_123 »

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

Code: Select all

if (tabcolor == INITR_BLACKTAB)   color = swapcolor(color); 
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:

Code: Select all

    ST7735_MADCTL , 1      ,  // 14: Memory access control (directions), 1 arg:
      0xC0,                   //     row addr/col addr, bottom to top refresh
 
Also remove all instances of MADCTL_RGB from setRotation

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: 1.8" TFT LCD with black tab - swapped colors

Post by adafruit »

Thats right! thanks for the reminder, latest github library has this fix and supports all tab colors

Aron
 
Posts: 1
Joined: Mon Aug 26, 2013 8:13 am

Re: 1.8" TFT LCD with black tab - swapped colors

Post by Aron »

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!

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: 1.8" TFT LCD with black tab - swapped colors

Post by adafruit_support_rick »

That file is part of the Beagleboard kernel distribution. We don't support it here. You'll have to contact Beagleboard.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”