5

I'm using a TFT Touchscreen shield with my Arduino UNO, and I'm running "tftpaint" example by Adafruit.

I've noticed that when initializing the Touchscreen object, a resistance value must be provided. Library default is 300, but a comment in the code says:

// For better pressure precision, we need to know the resistance
// between X+ and X- Use any multimeter to read it

How should I perform such measurement? Where do I put the probes of my multimeter? FYI, my shield is this one:

TFT Touchscreen Arduino Shield

jotadepicas
  • 326
  • 5
  • 13

2 Answers2

5

As pointed out in other answers and comments, step one was trying to get a datasheet for this component. I couldn't find a datasheet for the shield, but here is the link from the vendor I bought it from, and they provided with some articles were they explained how to perform the resistance measure. However, I then noticed the answer was in the example code itself.

Btw, the shield it's indeed based on SPFD5408 as correctly suggested by user Michel Keijzers on his answer.

So, in turns out the hint to which pins were X+ and X- was actually in the example code I'm using. Here the Touchscreen object is initialized:

TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);

Notice the usage of constants XP and XM. The names stand for "X-plus" (X+) and "X-minus" (X-). Now if we look a couple of lines above where these constants are defined, we see this:

#define YP A3
#define XM A2
#define YM 9
#define XP 8

In particular, we see that XM (i.e. "X-") is mapped to analog pin A2, and XP (i.e. "X+") is mapped to digital pin 8.

Now, by looking at how the shield couples with arduino, we can see that analog pin A2 of the Arduino board, connects with pin labeled "LCD_RS" in the shield, and that pin 8 connects with pin labeled "LCD_D0".

This is a picture (found online) of the bottom side of the shield, were we can see the labels for each pin:

TFT LCD Shield bottom

Finally, with a multimeter at those pins, I measured the resistance and it was 292 Ohms. Not so different from the default of 300 in the library, but it's still a good thing to have the correct value.

jotadepicas
  • 326
  • 5
  • 13
1

Your TFT seems like this: TFT LCD SPFD5408

I cannot find a datasheet, but normally the X+ and X- are shown on the device... if not, try to find the datasheet and look for the pin numbers.

Michel Keijzers
  • 13,014
  • 7
  • 41
  • 58