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

  • Would you care to provide a link to the datasheet or at least provide the name of the TFT? The code clearly states X+ and X-, it's not as easy as the board having two pinouts named as such is it? – stevieb Jul 22 '17 at 17:38
  • I couldn't find a datasheet for this particular shield. The board does not show pins labeled like that, but the hint to that was actually in the code, in variables named "XP" ("X Plus") and "XM" ("X Minus). I'll expand this in an answer of my own. – jotadepicas Jul 23 '17 at 16:54

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.

  • If this was the correct answer then please mark it as accepted (button below the down arrow). – Avamander Aug 22 '17 at 20:19

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.

  • Thanks, it is indeed based on SPFD5408. FYI, the link you provided points to a wireless module, not this TFT LCD display. X- and X+ where not shown on the device, but the hint to which pins they map was in the code. – jotadepicas Jul 23 '17 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.