ILI9325 LCD Touch with STM32f103c8t6

Working libraries, libraries being ported and related hardware
stevestrong
Posts: 3053
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: ILI9325 LCD Touch with STM32f103c8t6

Post by stevestrong » Sun Dec 23, 2018 8:37 am

Sorry but I didn't use that code since a very long time, and I don't know how your sketch looks like.

Here I have found a solution to a similar issue: https://forum.arduino.cc/index.php?topi ... msg2560334
G***le is your friend ;)

mephisto000
Posts: 9
Joined: Thu Dec 20, 2018 7:36 pm

Re: ILI9325 LCD Touch with STM32f103c8t6

Post by mephisto000 » Sun Dec 23, 2018 4:03 pm

sorry but i did't find the solution....

I looked in the Link but he had the ordinary Libary from Adafruit and there you can change mapping in the sketch.
He change this Line above and after that it worked. He has only the y value mirror.

Code: Select all

 p.y = map(p.y, TS_MAXY, TS_MINY, tft.height()-BOXSIZE*2, 0); //Here I changed the values of the MAXY and MINY around.
I search in the TouchScreen_STM32.cpp and find this line.

Code: Select all

// map coordinates to display ranges
	int x0 = map(p0.x, xmin, xmax, 0, x_range);
	tsp->x = x0;
	int y0 = map(p0.y, ymin, ymax, 0, y_range);
	tsp->y = y0;
	tsp->z = p0.z;
I have try a lot but nothing goes in the right direction.

I search also google but i found nobody that have the same error and use the same Libary.
I use the Examle code from SteveStrong with only this little difference

Code: Select all

// * Thats till now fuction but inverse
#define XM TFT_RS // 330 Ohm // must be an analog pin !!!
#define YP TFT_WR // 500 Ohm // must be an analog pin !!!
#define XP PB14 //TFT_D6 // 330 Ohm // can be a digital pin // Here i change the Pin to D6
#define YM PB15 //TFT_D7 // 500 Ohm // can be a digital pin // Here i change the Pin to D7 

stevestrong
Posts: 3053
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: ILI9325 LCD Touch with STM32f103c8t6

Post by stevestrong » Mon Dec 24, 2018 8:11 am

OK, I try to test the code again, maybe I can reproduce your problem by swapping some of the pins.

Post Reply