I bought a display with a i2c touchscreen from Aliexpress and hooked it up to my Raspberry Pi 3b+. The screen part works fine, however, the touchscreen part is flaky. When I just boot the pi, the touchscreen works for a bit, it, however, stops working after a few seconds. But touching the INT pin of the touchscreen makes it work again for a few seconds. What also works is taking a wire and connecting one end to ground and tapping the INT pin for a split second with the other end of the ground wire. This INT pin is the interrupt pin, it is high when nothing is happening but goes low once it's got a new message(e.g. a touch event). I think by tapping the INT pin with a ground wire or touching it I am stimulating a new message causing it to spring back to life until it fails again for some reason.

The INT pin is a direct connection from the touch chip to a raspberry pi gpio. But I have added a 5K resistor to 3V3 because the touch IC datasheet said I should have one between 1K and 10K to VDD. I tried other values of resistors(2K, 6K, 12K) and some work for longer periods of time than other values. But at some point, it always fails.

The reason I don't think the i2c data lines are at fault is because touching those lines once it stops working doesn't really do anything, but touching the INT pin does.

So my question is, why is my INT pin acting so weird? Is it a power supply issue? Is it maybe interference?(From the LCD data wires perhaps) How can I solve it?


Edit: Touch IC is Atmel mXT224. It is hooked up using a custom PCB. Traces are less than 5cm. 2.2K pullups on SDA and SCL. currently 12K pullup on INT. Other than that there is 3v3 and GND. To which I added a 100nF cap and 2x 1uF caps. And the i2c connection is raspberry pi software i2c with 10us delay.(So 10us clock I guess, which would translate to 100khz)

  • 1
    \$\begingroup\$ Please post the display part number or a hookup schematic. It looks to me like this is a communication issue with the touchscreen. \$\endgroup\$ – Judson Hudson Nov 29 '19 at 17:32
  • \$\begingroup\$ @JudsonHudson Updated begin post. \$\endgroup\$ – appmaker1358 Nov 29 '19 at 17:37
  • 1
    \$\begingroup\$ You will have to consider this in the context of the programmers manual of the chip and the specific software attempting to operate it. Anything else is uninformed guesswork. \$\endgroup\$ – Chris Stratton Nov 29 '19 at 17:45
  • \$\begingroup\$ Exactly which screen do you have, and what software are you using to control it? \$\endgroup\$ – Bruce Abbott Nov 29 '19 at 17:53
  • \$\begingroup\$ @BruceAbbott Display: aliexpress.com/item/32573391663.html I am using Raspberry Pi DPI interface to drive the LCD, and I'm using the atmel_mxt_tx linux driver with raspberry pi software i2c to communicate with the display and produce Linux touch events. I have no idea how the atmel_mxt_tx driver works internally, I only wrote a dtoverlay for it. Edit: dmesg doesn't mention any atmel related errors so the driver doesn't appear to know soemthings wrong.(Or at least doesn't tell me about it) \$\endgroup\$ – appmaker1358 Nov 29 '19 at 17:56

Your Answer

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

Browse other questions tagged or ask your own question.