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

1.8" TFT LCD with black tab - swapped colors

Postby Andy_123 » Sun Jan 27, 2013 1:43 pm

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 6:18 pm, edited 1 time in total.
Andy_123
 
Posts: 6
Joined: Sun Jan 27, 2013 1:29 pm

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

Postby Andy_123 » Sun Jan 27, 2013 5:11 pm

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?
Andy_123
 
Posts: 6
Joined: Sun Jan 27, 2013 1:29 pm

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

Postby adafruit_support_rick » Sun Jan 27, 2013 6:29 pm

We stock 3 different 1.8" TFT devices. What is the product ID of the screen you have?
User avatar
adafruit_support_rick
 
Posts: 2882
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

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

Postby Andy_123 » Sat Apr 27, 2013 10:52 am

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
Andy_123
 
Posts: 6
Joined: Sun Jan 27, 2013 1:29 pm

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

Postby adafruit » Mon Apr 29, 2013 8:58 pm

Thats right! thanks for the reminder, latest github library has this fix and supports all tab colors
User avatar
adafruit
 
Posts: 10485
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc


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

Who is online

Users browsing this forum: mibignistinly and 4 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [100]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[108]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[69]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]