Hi guys,
I have a problem with the connection touchscreen with Arduino UNO. My display module: http://www.farnell.com/datasheets/1681415.pdf?_ga=2.105188995.1400648493.1574689032-131493234.1574689032
I use UTFT library for display driver ILI9341 (SPI interface, it works) and URTouch library for Touch Screen.
But I can't understand what the pins of display module I have to use with the URTouch library:
URTouch(TCLK, TCS, TDIN, TDOUT, IRQ);
Parameters:
TCLK: Pin for Touch Clock (D_CLK)
TCS: Pin for Touch Chip Select (D_CS)
TDIN: Pin for Touch Data input (D_DIN)
TDOUT: Pin for Touch Data output (D_OUT)
IRQ: Pin for Touch IRQ (DPenirq)
???
Thank you!
Go on. You have a bare Resistive Panel i.e. with X+,X- Y+,Y- pins. (XP, XM, YP, YM)
URTouch.h is for bit-banging XPT2046 controller chip (or equivalent).
You need to use TouchScreen.h (or equivalent) for this bare Touch panel.
If you want to use a Uno (which has 5V logic) you need 3.3V level-shifters on every logic signal.
I strongly suggest that you select 4-Wire SPI interface (via IM# pins) because it needs less level-shifters.
If you select 8080-8 Parallel interface you need LVC245 buffer chips.
8080-16 requires more pins than your Uno possesses.
Life is much simpler with a proper 3.3V Arduino e.g. Zero, Due, ...
David.
Hi,
I would like to use optocoupler(cny17F) like level-shifter (3.3V to 5V). But I am not sure if the resistive touchscreen module can give If = 10 mA, which requires diode in optocoupler?
Thanks
Why would you want to use opto-couplers?
As a general rule, opto-couplers are crap.
Life is easier with direct port connections to 3.3V Arduino.
Touch panels can be driven by AVR. You can't read ADC via opto-couplers or even level-shifters.
Your XM,XP,YP,YM pins are separate from the TFT controller pins.
Life is even easier if you buy an Arduino Display Shield that plugs directly onto Arduino header sockets (as God intended)
The shield will have any level-shifters, buffers, regulators, ... already mounted.
Note that "Mcufriend designed" pcb is crap. Likewise "Surenoo designed" pcb.
Adafruit, Seeed, Waveshare, ... are probably designed correctly.
David.