CMY <> RGB

I have been tearing my hair out trying to get an unidentified/unidentifiable 4" 400x240 TFT screen to work. I have almost succeeded, using a HenningKarlsen 480x320 library.

One thing that has come out of this is that the display is working subtractive CMY rather than RGB. This is not necessarily a problem, once you realise what is going on, and there are worse things happening.

Is the colour generation something that is inherent in the display, or is it in the library?

I have written to the supplier about this display but they haven't answered - perhaps with good reason.

Is not CMY simply the negative of RGB?

Only inasmuch that red is opposite cyan on the colour wheel and working with it here is still additive procedure rather than CMYK pigments, but that doesn't explain anything.

I presume you are using the UTFT library - it would help to post your code - but the library does not appear to know anything about CMY. It converts an RGB colour into two bytes with the format RRRRRGGG GGGBBBBB which is sent to the LCD.

Pete

Thanks. I guess you have answered it. I am using the UTFT library, but posting the code wouldn't help at all as it is unique to the display I have, a display that appears to be unique to me. This is a 400x240 from ColdTears, and the only way I have been able to get it to work is to adapt Karlsen's 480x320 example, calling the CTE32HR. Part of the adaptation is to use CMY codes to get the colours.

I have just received a note from Henning Karlsen. He can't help but he is just as skeptical of the display being CMY as I am - hence my post.

The response from ColdTears is even less than that to my original query about the display on this forum.

Nick_Pyner:
Only inasmuch that red is opposite cyan on the colour wheel and working with it here is still additive procedure rather than CMYK pigments, but that doesn’t explain anything.

It explains it all!

Cyan is the absence of red and similarly magenta and green, yellow and blue. “Absence” = negative. So you just invert the numbers to convert CMY to RGB.

It explains nothing.
I can get the colours I want, indeed the display will eventually do what I need by adapting the UTFT 480x320 example. What I would like to know is how come I seem to be the only person with a CMY display?
Henning Karlsen has never heard of such a thing. Is it because I am using a non-kosher library? And would the real one, if it exists, enable me to send RGB? I imagine el Supremo is right, the library just sends the numbers as entered.

Is this display serial or parallel? If it is parallel then what might be happening is that the colour you are loading is being inverted so that it looks like CMY.

Pete

It's parallel.

If you have a display like this:
http://stores.ebay.ca/coldtears-electronics-store/TFT-LCD-Modules-/_i.html?_fsub=3830141016
download the file with pin definitions etc. It contains R61509V.pdf. On page 85 it describes a REV bit which inverts grayscale on the display. If that bit is set, and if it also works for colour, that will also switch CMY <-> RGB. It will probably take a fair bit of digging through the UTFT code to figure out if that is the problem.

Pete

el_supremo:
... what might be happening is that the colour you are loading is being inverted so that it looks like CMY.

And that is what I have been pointing out all along. It is rather grandiose to suggested that you have "discovered a new breed of LCD display" when all it is, is that the manufacturer - for whatever design reason - has chosen to use inverted logic.

Did by any chance, the difficulty with getting the library to work happen to involve other control signals and functions, being inverted?

el_supremo:
If you have a display like this:
MWC electronics store | eBay Stores
download the file with pin definitions etc. It contains R61509V.pdf.

Thanks. The display came from ColdTears but it is not in that link and I assume it is no longer available - perhaps for good reason. I have just downloaded the PDF, and we might eventually get to the bottom of this. Meanwhile, the display works quite well for what I need. While I call it CMY and the C is pretty right, I think the Y is suss, which results in a wussy green, the M is really Violet

Paul__B:
It is rather grandiose to suggested that you have "discovered a new breed of LCD display" when all it is, is that the manufacturer - for whatever design reason - has chosen to use inverted logic.

Did by any chance, the difficulty with getting the library to work happen to involve other control signals and functions, being inverted?

I didn't say I've discovered anything, I said I seem to be the only one with a CMY display which, in the light of this thread and the underwhelming response to my recent call for aid in identifying what I have, still seems to be the case but I will happily relinquish my unique position.

Once the colours have been dealt with, there really isn't much left to invert. Other adjustments were straightforward enough, once I got to understand them. Even the text location shortcuts may be fixable, but I don't expect to ever do that.

I'm pretty sure the library isn't the problem anyway, and it is all down to the example, and getting a result therefrom has been largely down to luck.