FIXED: SSD1963 controller with 7" TFT (horizontally mirrored image)

Yes Im using Arduino Due!

I followed all your instructions for my own sample code... I only drew a rectangle, a circle, and a line of text.
In my code, I begin by clearing the screen, followed by this command:
myGLCD.Swtich_LCD_TB_Bit(0);

If I ommited it, then my text was mirrored horizontally.

Thank you for your help, the CTE UTFT libraries now work with my 7" SSD1963 display. Looking forward to trying the 5 " model.
I will be watching your work with the Henning's library too.

cowasaki:
I have been speaking with the creator of the UTFT library Henning Karisen and it would appear that when I download the latest version from his site I am getting an old version, in fact a very old version. We cannot work out why this is happening but we only realised this when I sent him back a copy of the UTFT.cpp file which was 3 times the size of the current one.

Your browser is caching the old one? flush the caches and try again.

Hi Guys,

what's the status of this issue ?

I've just made it work - Arduino Due + 7" TFT + UTFT library [ Henning Karlsen ] + same tweaks [ inspired by this topic ]

mzahor:
Hi Guys,

what's the status of this issue ?

I've just made it work - Arduino Due + 7" TFT + UTFT library [ Henning Karlsen ] + same tweaks [ inspired by this topic ]

That's just about it to be honest. Henning's library with a few tweaks..........

I'm using the 32 pin + 2 pins for LEDA/K board because the ebay supplier sent me the wrong board. I've had a full refund and ordered a 40 pin version but it had not arrived yet. Using Henning's library with the tweaks PLUS CTE's SD stuff I have managed to get the TFT & the TFT's SD card reader to work but still haven't got the touch to work at all.

I've created "driver" files:

/800_3/initlcd.h

case SSD1963_800_3:

LCD_Write_COM(0xE2); //PLL multiplier, set PLL clock to 120M
LCD_Write_DATA(0x23); //N=0x36 for 6.5M, 0x23 for 10M crystal
LCD_Write_DATA(0x02);
LCD_Write_DATA(0x04);
LCD_Write_COM(0xE0); // PLL enable
LCD_Write_DATA(0x01);
delay(10);
LCD_Write_COM(0xE0);
LCD_Write_DATA(0x03);
delay(10);
LCD_Write_COM(0x01); // software reset
delay(100);
LCD_Write_COM(0xE6); //PLL setting for PCLK, depends on resolution
LCD_Write_DATA(0x04);
LCD_Write_DATA(0x93);
LCD_Write_DATA(0xE0);

LCD_Write_COM(0xB0); //LCD SPECIFICATION
LCD_Write_DATA(0x0000);
LCD_Write_DATA(0x0000);
LCD_Write_DATA((799>>8)&0X00FF); //Set HDP
LCD_Write_DATA(799&0X00FF);
LCD_Write_DATA((479>>8)&0X00FF); //Set VDP
LCD_Write_DATA(479&0X00FF);
LCD_Write_DATA(0x0000);

LCD_Write_COM(0xB4); //HSYNC
LCD_Write_DATA((1000>>8)&0X00FF); //Set HT
LCD_Write_DATA(1000&0X00FF);
LCD_Write_DATA((51>>8)&0X00FF); //Set HPS
LCD_Write_DATA(51&0X00FF);
LCD_Write_DATA(8); //Set HPW
LCD_Write_DATA((3>>8)&0X00FF); //Set HPS
LCD_Write_DATA(3&0X00FF);
LCD_Write_DATA(0x0000);

LCD_Write_COM(0xB6); //VSYNC
LCD_Write_DATA((530>>8)&0X00FF); //Set VT
LCD_Write_DATA(530&0X00FF);
LCD_Write_DATA((24>>8)&0X00FF); //Set VPS
LCD_Write_DATA(24&0X00FF);
LCD_Write_DATA(3); //Set VPW
LCD_Write_DATA((23>>8)&0X00FF); //Set FPS
LCD_Write_DATA(23&0X00FF);

LCD_Write_COM(0xBA);
LCD_Write_DATA(0x06); //GPIO[3:0] out 1

LCD_Write_COM(0xB8);
LCD_Write_DATA(0x07); //GPIO3=input, GPIO[2:0]=output
LCD_Write_DATA(0x01); //GPIO0 normal

LCD_Write_COM(0x36); //rotation
LCD_Write_DATA(0x00);

LCD_Write_COM(0x3A); //pixel data interface
LCD_Write_DATA(0x50);

LCD_Write_COM(0xF0); //pixel data interface
LCD_Write_DATA(0x03);

delay(1);

setXY(0, 0, 799, 479);

LCD_Write_COM(0x26); //pixel data interface
LCD_Write_DATA(0x08);

LCD_Write_COM(0x29); //display on

LCD_Write_COM(0xBE); //set PWM for B/L
LCD_Write_DATA(0x06);
LCD_Write_DATA(0x55);
LCD_Write_DATA(0x01);
LCD_Write_DATA(0xf0);
LCD_Write_DATA(0x00);
LCD_Write_DATA(0x00);

LCD_Write_COM(0xd0);
LCD_Write_DATA(0x0d);

LCD_Write_COM(0x2C);
break;

800_3/setxy.h

case SSD1963_800_3:
swap(word, x1, y1);
swap(word, x2, y2);
LCD_Write_COM(0x2a);
LCD_Write_DATA(x1>>8);
LCD_Write_DATA(x1);
LCD_Write_DATA(x2>>8);
LCD_Write_DATA(x2);
LCD_Write_COM(0x2b);
LCD_Write_DATA(y1>>8);
LCD_Write_DATA(y1);
LCD_Write_DATA(y2>>8);
LCD_Write_DATA(y2);
LCD_Write_COM(0x2c);

break;

Added this method to UTFT class

void UTFT::Swtich_LCD_TB_Bit(int TB_Bit)
{
cbi(P_CS, B_CS);
switch(display_model)
{

case SSD1963_800_3:
if (TB_Bit==1)
{
LCD_Write_COM(0x36);
LCD_Write_DATA(0x02);
}
else
{
LCD_Write_COM(0x36);
LCD_Write_DATA(0x00);
}
break;

}
sbi (P_CS, B_CS);

}

and call it after TFT init

.....
#endif
#ifndef DISABLE_ILI9320
#include "tft_drivers/ili9320/initlcd.h"
#endif
}

sbi (P_CS, B_CS);

setColor(255, 255, 255);
setBackColor(0, 0, 0);
cfont.font=0;

Swtich_LCD_TB_Bit(1);

}

touchscreen does work for me

I'm using UTouch - there is one thing - Arduino version has commented pinMode(IRQ, OUTPUT / INPUT);
Then, in function "availableData", it will not read interrupt.

So we have to eather uncommnet these lines or set pinMode(2, INPUT); before running loop.

mzahor:
touchscreen does work for me

I'm using UTouch - there is one thing - Arduino version has commented pinMode(IRQ, OUTPUT / INPUT);
Then, in function "availableData", it will not read interrupt.

So we have to eather uncommnet these lines or set pinMode(2, INPUT); before running loop.

I'm running the CTE modified library for touch and all the pinMode() commands only have INPUT or OUTPUT not OUTPUT / INPUT.

It does detect a TOUCH event but always returns the same location.

#include "UTouch.h"
#include "UTouchCD.h"

UTouch::UTouch(byte tclk, byte tcs, byte din, byte dout, byte irq)
{
    T_CLK        = tclk;
    T_CS         = tcs;
    T_DIN        = din;
    T_DOUT       = dout;
    T_IRQ        = irq;
}

void UTouch::InitTouch(byte orientation)
{
	orient					= orientation;
	_default_orientation	= CAL_S>>31;
	touch_x_left			= (CAL_X>>14) & 0x3FFF;
	touch_x_right			= CAL_X & 0x3FFF;
	touch_y_top				= (CAL_Y>>14) & 0x3FFF;
	touch_y_bottom			= CAL_Y & 0x3FFF;
	disp_x_size				= (CAL_S>>12) & 0x0FFF;
	disp_y_size				= CAL_S & 0x0FFF;
	prec					= 10;

	pinMode(T_CLK,  OUTPUT);
    pinMode(T_CS,   OUTPUT);
    pinMode(T_DIN,  OUTPUT);
    pinMode(T_DOUT, INPUT);
    pinMode(T_IRQ,  OUTPUT);

	digitalWrite(T_CS,  HIGH);
	digitalWrite(T_CLK, HIGH);
	digitalWrite(T_DIN, HIGH);
	digitalWrite(T_CLK, HIGH);
}

void UTouch::touch_WriteData(byte data)
{
	byte temp;
	byte nop;

	temp=data;
	digitalWrite(T_CLK,LOW);

	for(byte count=0; count<8; count++)
	{
		if(temp & 0x80)
			digitalWrite(T_DIN, HIGH);
		else
			digitalWrite(T_DIN, LOW);
		temp = temp << 1; 
		digitalWrite(T_CLK, LOW);                
		nop++;
		digitalWrite(T_CLK, HIGH);
		nop++;
	}
}

word UTouch::touch_ReadData()
{
	byte nop;
	word data = 0;
	for(byte count=0; count<12; count++)
	{
		data <<= 1;
		digitalWrite(T_CLK, HIGH);               
		nop++;
		digitalWrite(T_CLK, LOW);
		nop++;
		if (digitalRead(T_DOUT))
			data++;
	}
	return(data);
}

void UTouch::read()
{
	unsigned long tx=0, temp_x=0;
	unsigned long ty=0, temp_y=0;
	int datacount=0;

	digitalWrite(T_CS,LOW);                    

	for (int i=0; i<prec; i++)
	{
		touch_WriteData(0x90);        
		digitalWrite(T_CLK,HIGH);
		digitalWrite(T_CLK,LOW); 
		temp_x=touch_ReadData();

		touch_WriteData(0xD0);      
		digitalWrite(T_CLK,HIGH);
		digitalWrite(T_CLK,LOW);
		temp_y=touch_ReadData();

		if (!((temp_x>max(touch_x_left, touch_x_right)) or (temp_x==0) or (temp_y>max(touch_y_top, touch_y_bottom)) or (temp_y==0)))
		{
			ty+=temp_x;
			tx+=temp_y;
			datacount++;
		}
	}

	digitalWrite(T_CS,HIGH);
	if (datacount>0)
	{
		if (orient == _default_orientation)
		{
			TP_X=tx/datacount;
			TP_Y=ty/datacount;
		}
		else
		{
			TP_X=ty/datacount;
			TP_Y=tx/datacount;
		}
	}
	else
	{
		TP_X=-1;
		TP_Y=-1;
	}
}

bool UTouch::dataAvailable()
{
	bool avail;
	pinMode(T_IRQ,  INPUT);
	avail = !digitalRead(T_IRQ);
	pinMode(T_IRQ,  OUTPUT);
	return avail;
}

int UTouch::getX()
{
	long c;

	if (orient == _default_orientation)
	{
		c = long(long(TP_X - touch_x_left) * (disp_x_size)) / long(touch_x_right - touch_x_left);
		if (c<0)
			c = 0;
		if (c>disp_x_size)
			c = disp_x_size;
	}
	else
	{
		if (_default_orientation == PORTRAIT)
			c = long(long(TP_X - touch_y_top) * (-disp_y_size)) / long(touch_y_bottom - touch_y_top) + long(disp_y_size);
		else
			c = long(long(TP_X - touch_y_top) * (disp_y_size)) / long(touch_y_bottom - touch_y_top);
		if (c<0)
			c = 0;
		if (c>disp_y_size)
			c = disp_y_size;
	}
	return c;
}

int UTouch::getY()
{
	int c;

	if (orient == _default_orientation)
	{
		c = long(long(TP_Y - touch_y_top) * (disp_y_size)) / long(touch_y_bottom - touch_y_top);
		if (c<0)
			c = 0;
		if (c>disp_y_size)
			c = disp_y_size;
	}
	else
	{
		if (_default_orientation == PORTRAIT)
			c = long(long(TP_Y - touch_x_left) * (disp_x_size)) / long(touch_x_right - touch_x_left);
		else
			c = long(long(TP_Y - touch_x_left) * (-disp_x_size)) / long(touch_x_right - touch_x_left) + long(disp_x_size);
		if (c<0)
			c = 0;
		if (c>disp_x_size)
			c = disp_x_size;
	}
	return c;
}

void UTouch::setPrecision(byte precision)
{
	switch (precision)
	{
		case PREC_LOW:
			prec=1;
			break;
		case PREC_MEDIUM:
			prec=10;
			break;
		case PREC_HI:
			prec=25;
			break;
		case PREC_EXTREME:
			prec=100;
			break;
		default:
			prec=10;
			break;
	}
}

by OUTPUT / INPUT I meant that some are INPUT some OUTPUT - as it is in your code

My UTouch library [ I have commented pinMode(T_IRQ, OUTPUT); ] because I'm using interrupt to handle touch and need this pin as INPUT.

The most important file is : UTouchCD.h

these numbers comes from Calibration Sketch - is it possible that you have wrong calibration ?

#define CAL_X 0x00378DF2UL
#define CAL_Y 0x00158F91UL
#define CAL_S 0x001DF31FUL

UTouch.cpp

/*
UTouch.cpp - Arduino/chipKit library support for Color TFT LCD Touch screens
Copyright (C)2010-2012 Henning Karlsen. All right reserved

Basic functionality of this library are based on the demo-code provided by
ITead studio. You can find the latest version of the library at
http://www.henningkarlsen.com/electronics

If you make any modifications or improvements to the code, I would appreciate
that you share the code with me so that I might include it in the next release.
I can be contacted through Electronics - Henning Karlsen

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "UTouch.h"
#include "UTouchCD.h"

UTouch::UTouch(byte tclk, byte tcs, byte din, byte dout, byte irq)
{
T_CLK = tclk;
T_CS = tcs;
T_DIN = din;
T_DOUT = dout;
T_IRQ = irq;
}

void UTouch::InitTouch(byte orientation)
{
orient = orientation;
_default_orientation = CAL_S>>31;
touch_x_left = (CAL_X>>14) & 0x3FFF;
touch_x_right = CAL_X & 0x3FFF;
touch_y_top = (CAL_Y>>14) & 0x3FFF;
touch_y_bottom = CAL_Y & 0x3FFF;
disp_x_size = (CAL_S>>12) & 0x0FFF;
disp_y_size = CAL_S & 0x0FFF;
prec = 10;

pinMode(T_CLK, OUTPUT);
pinMode(T_CS, OUTPUT);
pinMode(T_DIN, OUTPUT);
pinMode(T_DOUT, INPUT);
// pinMode(T_IRQ, OUTPUT);

digitalWrite(T_CS, HIGH);
digitalWrite(T_CLK, HIGH);
digitalWrite(T_DIN, HIGH);
digitalWrite(T_CLK, HIGH);
}

void UTouch::touch_WriteData(byte data)
{
byte temp;
byte nop;

temp=data;
digitalWrite(T_CLK,LOW);

for(byte count=0; count<8; count++)
{
if(temp & 0x80)
digitalWrite(T_DIN, HIGH);
else
digitalWrite(T_DIN, LOW);
temp = temp << 1;
digitalWrite(T_CLK, LOW);
nop++;
digitalWrite(T_CLK, HIGH);
nop++;
}
}

word UTouch::touch_ReadData()
{
byte nop;
word data = 0;
for(byte count=0; count<12; count++)
{
data <<= 1;
digitalWrite(T_CLK, HIGH);
nop++;
digitalWrite(T_CLK, LOW);
nop++;
if (digitalRead(T_DOUT))
data++;
}
return(data);
}

void UTouch::read()
{
unsigned long tx=0, temp_x=0;
unsigned long ty=0, temp_y=0;
int datacount=0;

digitalWrite(T_CS,LOW);

for (int i=0; i<prec; i++)
{
touch_WriteData(0x90);
digitalWrite(T_CLK,HIGH);
digitalWrite(T_CLK,LOW);
temp_y=touch_ReadData();

touch_WriteData(0xD0);
digitalWrite(T_CLK,HIGH);
digitalWrite(T_CLK,LOW);
temp_x=touch_ReadData();

if (!((temp_x>max(touch_x_left, touch_x_right)) or (temp_x==0) or (temp_y>max(touch_y_top, touch_y_bottom)) or (temp_y==0)))
{
tx+=temp_x;
ty+=temp_y;
datacount++;
}
}

digitalWrite(T_CS,HIGH);
if (datacount>0)
{

if (orient == _default_orientation)
{
TP_X=tx/datacount;
TP_Y=ty/datacount;
}
else
{
TP_X=ty/datacount;
TP_Y=tx/datacount;
}

}
else
{
TP_X=-1;
TP_Y=-1;
}

}

void UTouch::readx()
{
unsigned long tx=0, temp_x=0;
unsigned long ty=0, temp_y=0;
int datacount=0;

digitalWrite(T_CS,LOW);

for (int i=0; i<prec; i++)
{
touch_WriteData(0x90);
digitalWrite(T_CLK,HIGH);
digitalWrite(T_CLK,LOW);
temp_x=touch_ReadData();

touch_WriteData(0xD0);
digitalWrite(T_CLK,HIGH);
digitalWrite(T_CLK,LOW);
temp_y=touch_ReadData();

ty+=temp_x;
tx+=temp_y;
datacount++;

}

digitalWrite(T_CS,HIGH);
if (datacount>0)
{

TP_X=tx/datacount;
TP_Y=ty/datacount;

}
else
{
TP_X=-1;
TP_Y=-1;
}

}

bool UTouch::dataAvailable()
{
bool avail;
// pinMode(T_IRQ, INPUT);
avail = !digitalRead(T_IRQ);
// pinMode(T_IRQ, OUTPUT);
return avail;
}

int UTouch::getX()
{
long c;

if (orient == _default_orientation)
{
c = long(long(TP_X - touch_x_left) * (disp_x_size)) / long(touch_x_right - touch_x_left);
if (c<0)
c = 0;
if (c>disp_x_size)
c = disp_x_size;
}
else
{
if (_default_orientation == PORTRAIT)
c = long(long(TP_X - touch_y_top) * (-disp_y_size)) / long(touch_y_bottom - touch_y_top) + long(disp_y_size);
else
c = long(long(TP_X - touch_y_top) * (disp_y_size)) / long(touch_y_bottom - touch_y_top);
if (c<0)
c = 0;
if (c>disp_y_size)
c = disp_y_size;
}
return c;
}

int UTouch::getY()
{
int c;

if (orient == _default_orientation)
{
c = long(long(TP_Y - touch_y_top) * (disp_y_size)) / long(touch_y_bottom - touch_y_top);
if (c<0)
c = 0;
if (c>disp_y_size)
c = disp_y_size;
}
else
{
if (_default_orientation == PORTRAIT)
c = long(long(TP_Y - touch_x_left) * (disp_x_size)) / long(touch_x_right - touch_x_left);
else
c = long(long(TP_Y - touch_x_left) * (-disp_x_size)) / long(touch_x_right - touch_x_left) + long(disp_x_size);
if (c<0)
c = 0;
if (c>disp_x_size)
c = disp_x_size;
}
return c;
}

void UTouch::setPrecision(byte precision)
{
switch (precision)
{
case PREC_LOW:
prec=1;
break;
case PREC_MEDIUM:
prec=10;
break;
case PREC_HI:
prec=25;
break;
case PREC_EXTREME:
prec=100;
break;
default:
prec=10;
break;
}
}

UTouch.h

/*
UTouch.h - Arduino/chipKit library support for Color TFT LCD Touch screens
Copyright (C)2010-2012 Henning Karlsen. All right reserved

Basic functionality of this library are based on the demo-code provided by
ITead studio. You can find the latest version of the library at
http://www.henningkarlsen.com/electronics

If you make any modifications or improvements to the code, I would appreciate
that you share the code with me so that I might include it in the next release.
I can be contacted through Electronics - Henning Karlsen

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef UTouch_h
#define UTouch_h

#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

#define PORTRAIT 0
#define LANDSCAPE 1

#define PREC_LOW 1
#define PREC_MEDIUM 2
#define PREC_HI 3
#define PREC_EXTREME 4

class UTouch
{
public:
word TP_X ,TP_Y;
long disp_x_size, disp_y_size, default_orientation;
long touch_x_left, touch_x_right, touch_y_top, touch_y_bottom;
long _default_orientation;

UTouch(byte tclk, byte tcs, byte tdin, byte dout, byte irq);

void InitTouch(byte orientation = LANDSCAPE);
void read();
void readx();

bool dataAvailable();
int getX();
int getY();
void setPrecision(byte precision);

private:
byte T_CLK, T_CS, T_DIN, T_DOUT, T_IRQ;
byte orient;
byte prec;
byte display_model;

void touch_WriteData(byte data);
word touch_ReadData();
};

#endif

I still can't get touch to work.

I can get the TFT and SD to work....

UTFT        myGLCD(CTE70);   // Remember to change the model parameter to suit your display module!

This starts up the TFT fine, the line definitions seem to be set up by CTE's library

I'm using the following line for the touch library but can't be absolutely sure I have the lines correct.

UTouch      myTouch(6,5,32,3,2);

Anybody know what they should be for the CTE shield. I think they are right but could just do with checking.

Hello, I am new to the forum and have a problem that may be directly related. I am not a programmer even though I have been doing it as a hobby for many years. mostly machine language and Visual Basic. Although it's been many years since I've done any machine language programming. Very little in C/C++.
I'm using an Arduino due, adapter shield and a 7 inch TFT display. The same display described here.
Generally my display works correctly but with two exceptions. When using the "PrintnNumF" and "PrintnNumI" function I have to declare the font before I use the function. It gives me an error whenever I use the fonts supplied with the display. I can use the UTFT fonts supplied with the drivers, but the fonts come out mirrored, however the order is correct. The fonts that are supplied with the display work correctly for all other print statements. The UTFT are in the correct order but the individual fonts are mirrored regardless of which print statement I use.

My projects, a "Arduino based DRO" needs to display formatted numbers. And the UTFT fonts a bit small for the application anyway. I need to know how to use the set font function with the fonts supplied with the display.

Anyone else observed this problem

Any help will be greatly appreciated.

promacjoe.

promacjoe:
Hello, I am new to the forum and have a problem that may be directly related. I am not a programmer even though I have been doing it as a hobby for many years. mostly machine language and Visual Basic. Although it's been many years since I've done any machine language programming. Very little in C/C++.
I'm using an Arduino due, adapter shield and a 7 inch TFT display. The same display described here.
Generally my display works correctly but with two exceptions. When using the "PrintnNumF" and "PrintnNumI" function I have to declare the font before I use the function. It gives me an error whenever I use the fonts supplied with the display. I can use the UTFT fonts supplied with the drivers, but the fonts come out mirrored, however the order is correct. The fonts that are supplied with the display work correctly for all other print statements. The UTFT are in the correct order but the individual fonts are mirrored regardless of which print statement I use.

My projects, a "Arduino based DRO" needs to display formatted numbers. And the UTFT fonts a bit small for the application anyway. I need to know how to use the set font function with the fonts supplied with the display.

Anyone else observed this problem

Any help will be greatly appreciated.

promacjoe.

I would suggest a new thread would be more appropriate as this question had nothing to do with the original post.

sorry to bring this back up but looking for update, i have the due with shield and 7" display as featured on ebay, i got the demo running, but it is mirrored reversed too.

what is the easiest current method to correct this ?

edit** this is not needed and not complete fix. all i had to do was use CTE70 not CTE50 as model selection (as after all i have a 7" model

i worked it out from your example and the datasheet, the library has changed a bit in layout so this is how you fix it now:

line 48 of \UTFT\tft_drivers\ssd1963\800\initlcd.h

change

	LCD_Write_DATA(0x0F);		//GPIO[3:0] out 1

to

	LCD_Write_DATA(0x0E);		//GPIO[3:0] out 1

haydent:
sorry to bring this back up but looking for update, i have the due with shield and 7" display as featured on ebay, i got the demo running, but it is mirrored reversed too.

what is the easiest current method to correct this ?

after getting the lcd working i too have tried to get the touch panel working.

i traced the lines with a multimeter and
UTouch myTouch(6,5,32,3,2);
or
UTouch myTouch(6,5,4,3,2);

seem correct, as 32 and 4 are connected in the shield CTE v1.04 i have

edit T_BUSY is not used by myTouch function...

the problem i believe is that the T_BUSY line (touch IC pin 13) in my lcd is not connected to the lcd 40 pin header.

this is delibrate as it matches the schematic diagrams i recieved with the module. though why it is the case i do not know. i believe this variant of the lcd module is a knock off of the CTE version, as they have said to me. thus it has problems like mirrored image, and they also say it doesnt actually have the font IC

any way im going to look into what this line does and if we can do with out it...

i feel silly, i had wrong model chosen

should be CTE70 not CTE50 for 7" display.

now i dont need the mirror fix as it was upside down as well and red wasnt displaying. this fixes it all

and my touch is working now for what ever reason

UTFT myGLCD(CTE70,25,26,27,28);
UTouch myTouch(6,5,4,3,2);

i had the same mirrored problem as you all have had, looking through the data sheet we found that the library for the ssd1963_800 has one line which sets the display mirrored or normal

this is from initlcd.h

	LCD_Write_COM(0x36);		//rotation
	LCD_Write_DATA(0x22);

to change just the mirror bit, change this out to:

	LCD_Write_COM(0x36);		//rotation
	LCD_Write_DATA(0x20);

(if it doesn't work, make sure arduino is actually reading from that library, which took me about 3 hours to figure out)

however i cannot get the touch screen to work. i'm using the TFT shield from elecfreaks

edit
touch screen was a hardware issue (though i don't know what the problem was, maybe a pin making poor contact)
only thing left to fix is the screen isn't displaying red
any ideas on this last issue?

edit 2
got the red sorted out thanks to another post i found on here,

had to change

	LCD_Write_COM(0xB0);		//LCD SPECIFICATION
	//LCD_Write_DATA(0x24);		//default

to

	LCD_Write_COM(0xB0);		//LCD SPECIFICATION
	//LCD_Write_DATA(0x14);		//7" tft

other users have mentioned using 0x04 instead of 0x14, but i had poor color display for small fonts (mainly, yellow tried to display in two colors)

pretty happy with this screen now!

Mr.Cowasaki

I done what you said about myGLCD.Swtich_LCD_TB_Bit(1); but it is giving error

"Arduino: 1.5.6-r2 (Windows 8), Board: "Arduino Due (Programming Port)"

UTFT_Demo_800x480.ino: In function 'void loop()':
UTFT_Demo_800x480:46: error: 'class UTFT' has no member named 'Swtich_LCD_TB_Bit'

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

Still I dont know how can I correct this mirror effect on my screen

sorry I am a new user of arduino may be there is very simple solution I need help !!!

Thanks everybody

Hello !

I´ve got an working sketch on an 3.2" TFT Display with an IBT chip on it and
at the moment i try to transfer this to an 7" Display with an SSD1963 controller
onboard. its connected to an Arduino Mega Rev3 via shield.
I ´am using the great Libraries from Henning Karlsen which are quite easy to handle,
but now i´ve got some problems.
First it was this mirror thing and the white color which was not really "white".
After the post of isaac_alaksa :

LCD_Write_COM(0x36); //rotation
LCD_Write_DATA(0x22);

LCD_Write_COM(0x36); //rotation
LCD_Write_DATA(0x20);

I was able to solve this, so thank you isaac !

My last problem is about reading the SD Card.
I Use the UTFT_tinyFAT library of Henning Karlsen and that worked fine on my old 3.2" Display
but now I cant get a Picture on the new display.
Does anybody know how to fix this ?

Greetings and thank you,
Moritz

-- It´s my first post so I´am new at the Forum but actually quite fit in programming

Hi Guys

This is my first post to return all the help I have recieved over the last 2 years. Thanks guys! I can see this is an old thread but I managed a simple fix without diving into the deeper code.

I fixed the reverse image issue by checking out the documentation from Rinky Dink electronincs, there is a table of compatible displays and a list over which controller to select. I selected the CTE70 controller for my 7" dipslay in the line just before void setup in the demo example.

So I went from

// Remember to change the model parameter to suit your display module!
UTFT myGLCD(ITDB50,38,39,40,41);

to

// Remember to change the model parameter to suit your display module!
UTFT myGLCD(CTE70,38,39,40,41);

I hope that helps.

Alistair