# Touch Screen driver - XPT2046

**URL:** <https://community.particle.io/t/touch-screen-driver-xpt2046/18829>\
**Category:** Hardware\
**Created:** [January 6, 2016, 5:36am UTC](https://community.particle.io/t/touch-screen-driver-xpt2046/18829 "2016-01-06T05:36:11Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Awake](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@Awake](https://community.particle.io/u/Awake)\
**Post date:** [January 6, 2016, 5:36am UTC](https://community.particle.io/t/touch-screen-driver-xpt2046/18829/1 "2016-01-06T05:36:11Z")

</div>

I am working with an ILI9341 based Touch Screen display, and I have the display part working very nicely. But I can’t find a Photon compatible driver for the resistive touch screen component.  
The touch screen is completely independent from the display part, and both are SPI driven.  
I am using Hardware SPI for the display.  
The resistive touch controller seems quite common and the XPT2046 can replace ADS7843E TSC2046 ADS7843 ADS7846 RSM1.

FWIW, the display units are very nice. They are SPI 3 or 4 wire, 8 bit or 16 bit parallel, touch screen, SD card slot, extra memory available and accept font chips:  
[http://www.buydisplay.com/default/3-2-inch-capacitive-touchscreen-240x320-tft-lcd-module-display#111](http://www.buydisplay.com/default/3-2-inch-capacitive-touchscreen-240x320-tft-lcd-module-display#111)

Does anyone know of a successful implementation on the Photon for one of these touch chips?

---

<div class="post-metadata">

**Author:** ![peekay123](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/peekay123/32/810_2.png) [@peekay123](https://community.particle.io/u/peekay123)\
**Post date:** [January 6, 2016, 1:21pm UTC](https://community.particle.io/t/touch-screen-driver-xpt2046/18829/2 "2016-01-06T13:21:49Z")

</div>

@Awake, you could adapt this library:

> **[spapadim/XPT2046](https://github.com/spapadim/XPT2046)**
>
> Arduino library for XPT2046 / ADS7843 touchscreen driver

😄

---

<div class="post-metadata">

**Author:** ![Awake](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@Awake](https://community.particle.io/u/Awake)\
**Post date:** [January 6, 2016, 3:28pm UTC](https://community.particle.io/t/touch-screen-driver-xpt2046/18829/3 "2016-01-06T15:28:47Z")

</div>

Thanks!  
It looks like a fairly simple library. I’ll give it a try by just running it alone and printing coordinates to the serial port.

---

<div class="post-metadata">

**Author:** ![muneebr1](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@muneebr1](https://community.particle.io/u/muneebr1)\
**Post date:** [March 9, 2019, 12:21am UTC](https://community.particle.io/t/touch-screen-driver-xpt2046/18829/4 "2019-03-09T00:21:52Z")

</div>

Hey @peekay123, what other options are there for a good touch screen for the particle photon or Argon? (preferably Argon)

---

<div class="post-metadata">

**Author:** ![RWB](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rwb/32/22599_2.png) [@RWB](https://community.particle.io/u/RWB)\
**Post date:** [March 9, 2019, 12:34am UTC](https://community.particle.io/t/touch-screen-driver-xpt2046/18829/5 "2019-03-09T00:34:44Z")

</div>

What size you need?

Adafruit has a few.

---

<div class="post-metadata">

**Author:** ![muneebr1](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@muneebr1](https://community.particle.io/u/muneebr1)\
**Post date:** [March 9, 2019, 12:48am UTC](https://community.particle.io/t/touch-screen-driver-xpt2046/18829/6 "2019-03-09T00:48:39Z")

</div>

Hey @RWB

Something around 5 inch? Are they compatible with the Argon?

---

<div class="post-metadata">

**Author:** ![muneebr1](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@muneebr1](https://community.particle.io/u/muneebr1)\
**Post date:** [March 9, 2019, 12:53am UTC](https://community.particle.io/t/touch-screen-driver-xpt2046/18829/7 "2019-03-09T00:53:43Z")

</div>

One more thing, i will be acquiring the data for the screen over UART, so would need the corresponding pins for UART to be available.

---

<div class="post-metadata">

**Author:** ![muneebr1](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@muneebr1](https://community.particle.io/u/muneebr1)\
**Post date:** [March 10, 2019, 3:12pm UTC](https://community.particle.io/t/touch-screen-driver-xpt2046/18829/8 "2019-03-10T15:12:21Z")

</div>

@peekay123 Any recommendations?

---

<div class="post-metadata">

**Author:** ![peekay123](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/peekay123/32/810_2.png) [@peekay123](https://community.particle.io/u/peekay123)\
**Post date:** [March 10, 2019, 11:02pm UTC](https://community.particle.io/t/touch-screen-driver-xpt2046/18829/9 "2019-03-10T23:02:44Z")

</div>

@muneebr1, if a 2.6" touch screen works, take a look at [Digole](http://www.digole.com/) displays. They work over UART, I2C or SPI. They have an onboard PIC controller making them “intelligent” and they have online tools for converting bitmaps, and they have a [display emulator](https://www.digole.com/tools/emulaterhelp.php) for designing screens. I used one of these displays for a quick proof of concept for a client. Another approach I haven’t tried but would like to are FT8xx based displays. These are sophisticated display-list driven graphic processors. A good example is the [Gameduino 3](https://excamera.com/sphinx/gameduino3/#example-sketches) or the [Riverdi](https://riverdi.com/category/products/) display units.
