https://github.com/stevstrong/Adafruit_ … 8bit_STM32
My Pin setup (i use the USB-Port to bring the sketch on the BluePill and use this also as power supply at the moment)
5V 5V Bluepill
3V 3V Bluepill
Grd Grd Bluepill
TFT_RD PA0
TFT_WR PA1
TFT_RS PA2
TFT_CS PA3
TFT_RST PA8
LCD_D0 PB8
LCD_D1 PB9
LCD_D2 PB10
LCD_D3 PB11
LCD_D4 PB12
LCD_D5 PB13
LCD_D6 PB14
LCD_D7 PB15
I have change the Pins/Defitions in Adafruit_TFTLCD_8bit_STM32.h
#define TFT_DATA_SHIFT 8 // take the higher bits/pins 8..15
TFT_WR -> PA0
TFT_RS -> PA1
LCD_D0 -> PB8
LCD_D1 -> PB9
or
TFT_RS -> PA1
TFT_CS -> PA3
LCD_D0 – > PB8
LCD_D1 – > PB9
like in the sketch from Stevestrong
#define XM TFT_RS // 330 Ohm // must be an analog pin !!!
#define YP TFT_CS // 500 Ohm // must be an analog pin !!!
#define XP PB8 //TFT_D0 // 330 Ohm // can be a digital pin here the change to PB8 it was PB0
#define YM PB9 //TFT_D1 // 500 Ohm // can be a digital pin here the change to PB9 it was PB1
now i have found out with the Multimeter that my Pins not the same like as usual.
My Pins that i have to use are LCD_D6, LCD_D7 and for the control LCD_RS and LCD_WR.
#define XM LCD_RS // 330 Ohm // must be an analog pin !!!
#define YP LCD_WR // 500 Ohm // must be an analog pin !!!
#define XP PB14 //LCD_D6 // 330 Ohm // can be a digital pin
#define YM PB15 //LCD_D7 // 500 Ohm // can be a digital pin
The give me no reaction.
I am with my latin to end ![]()
I think the touch resolution should also be adapted to your screen resolution.
But first i have to say thank you both and the community, that you answer and help me.
https://www.youtube.com/watch?v=aOjCTMp … e=youtu.be
Ok, i will explain what i have done….
In the movie you will see the config below
#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
#define YM PB15 //TFT_D7 // 500 Ohm // can be a digital pin
If you ever read the voltage from a potentiometer, your half way there.
I think there is something wrong with the x and y axis.
But only a little mistake but didn’t find it.
I use also the Adafruit_TFTLCD_8bit_STM32.h Libary which was adapted by Steve.
Maybe i have to change something there, because my Pin Setup see above.
Here I have found a solution to a similar issue: https://forum.arduino.cc/index.php?topi … msg2560334
G***le is your friend ![]()
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.
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.


