mcufriend 320x480 strange touch issue

using the tft from mcufriend its a 320x480. i place buttons on the screen most of them work fine but at the top inch the screen "landscape mode" it seems like i have to press way under the button for it to recognize the touch. ive calibrated the touch over and over again. has anyone had this problem any ideas? this is suppose to wait for a touch basically in the top left corner. over to the right from the top left corner "10 to 100" then from top starting at "45 to 65"

(x > 10 && x < 100 && y > 45 && y < 65)

im confused!?!

i dumped the coordinates that are registered when i actually press the screen and they seemed pretty far off. i changed them now its working again. its strange i wonder if maybe the voltage regulator has something to do with it. it seems to change around a lot but the bottom 3/4 of the screen stays perfect.

Please run the Calibration sketch.
Copy-Paste from the Serial Terminal to your message and post it here.

When calibrated, you should get full use of the screen. Be realistic. Design your sketch to use buttons that the user can see and fit a finger on. No one carries a stylus in their pocket.

It is unwise to place a tiny button at the edge of the screen.

A simple test is to run the TouchShield example (with your calibration).
You will see how well the coloured spot follows your stylus.

David.

david_prentice:
Please run the Calibration sketch.
Copy-Paste from the Serial Terminal to your message and post it here.

When calibrated, you should get full use of the screen. Be realistic. Design your sketch to use buttons that the user can see and fit a finger on. No one carries a stylus in their pocket.

It is unwise to place a tiny button at the edge of the screen.

A simple test is to run the TouchShield example (with your calibration).
You will see how well the coloured spot follows your stylus.

David.

i had to enter a negative number for x to get to the top of the scree "-20" y seems to be fine i think. heres a full readout of the serial after calibration with stylus

pullup with corresponding pin
wction

Testing : (A1, D7) = 21
Testing : (A2, D6) = 32
Diagnosing as:-
XM,XP:  (A1, D7) = 21
YP,YM:  (A2, D6) = 32
ID = 0x6814

cx=126 cy=82 cz=614 LEFT, TOP, Pressure
cx=146 cy=507 cz=426 LEFT, MIDH, Pressure
cx=136 cy=910 cz=207 LEFT, BOT, Pressure
cx=517 cy=87 cz=625 MIDW, TOP, Pressure
cx=515 cy=912 cz=329 MIDW, BOT, Pressure
cx=888 cy=89 cz=691 RT, TOP, Pressure
cx=890 cy=498 cz=562 RT, MIDH, Pressure
cx=892 cy=914 cz=417 RT, BOT, Pressure
MCUFRIEND_kbv ID=0x6814  320 x 480

const int XP=7,XM=A1,YP=A2,YM=6; //320x480 ID=0x6814
const int TS_LEFT=110,TS_RT=915,TS_TOP=68,TS_BOT=929;
PORTRAIT CALIBRATION     320 x 480
x = map(p.x, LEFT=110, RT=915, 0, 320)
y = map(p.y, TOP=68, BOT=929, 0, 480)
Touch Pin Wiring XP=7 XM=A1 YP=A2 YM=6
LANDSCAPE CALIBRATION    480 x 320
x = map(p.y, LEFT=68, RT=929, 0, 480)
y = map(p.x, TOP=915, BOT=110, 0, 320)

Copy-Paste your calibration lines to the Touch example e.g. Touch_shield_new.ino

const int XP=7,XM=A1,YP=A2,YM=6; //320x480 ID=0x6814
const int TS_LEFT=110,TS_RT=915,TS_TOP=68,TS_BOT=929;

The coloured spot should follow the stylus. Your Calibration looks fairly normal.

My particular 0x6814 shield calibration is similar:

const int XP=7,XM=A1,YP=A2,YM=6; //320x480 ID=0x6814
const int TS_LEFT=134,TS_RT=906,TS_TOP=114,TS_BOT=924;

Note that calibration will vary with individual shields. But it is "likely" that they have the same X, Y wiring.

David.

david_prentice:
Copy-Paste your calibration lines to the Touch example e.g. Touch_shield_new.ino

Note that calibration will vary with individual shields. But it is "likely" that they have the same X, Y wiring.

David.

one thing i notice for sure is if i go from using my powered usb hub to power the arduino to using a usb power battery pack the calibration changes only on the top 1/4 of the screen. ill have to measure the voltage exactly. i am using the 3.3v regulator on the arduino to power the 3.3v pin on the tft.

powered usb hub touch radius is almost perfect despite having to input a negative number for Y coordinate . usb battery packs results in have to touch above the button every time. sounds like a voltage issue idk. i have lots of other buttons on the screen to and it only seems to effect the top 1/4 of the screen

The current Mcufriend pcbs seem to use the 3.3V pin to set the HC245 buffer output level AND power the backlight.

The Uno or Mega2560 3.3V regulator is not able to supply the backlight.
I would be 99% certain that Mcufriend shields will destroy your 3.3V regulator within hours or days.

I tend to use 3.3V targets e.g. Zero, Due, Nucleo, ...
Yes, the calibration does vary slightly when you use a 5V Uno or a 3.3V Due. This is mostly down to the HC245 instead of using LVC245 buffers. But the same calibration works well enough.

I suggest that you measure the current drawn from the Arduino 3.3V pin. The Uno spec says it should be less than 50mA.
Note that a Zero or Due has a bigger 3.3V regulator than a Uno/Mega.

David.

david_prentice:
The current Mcufriend pcbs seem to use the 3.3V pin to set the HC245 buffer output level AND power the backlight.

The Uno or Mega2560 3.3V regulator is not able to supply the backlight.
I would be 99% certain that Mcufriend shields will destroy your 3.3V regulator within hours or days.

I tend to use 3.3V targets e.g. Zero, Due, Nucleo, ...
Yes, the calibration does vary slightly when you use a 5V Uno or a 3.3V Due. This is mostly down to the HC245 instead of using LVC245 buffers. But the same calibration works well enough.

I suggest that you measure the current drawn from the Arduino 3.3V pin. The Uno spec says it should be less than 50mA.
Note that a Zero or Due has a bigger 3.3V regulator than a Uno/Mega.

David.

yea im using the mega2560 i just havnt gotten around to building a power source for the 3.3vlcd. as bad as it sounds the lcd has been running on that regulator for months now.

i am going to load test the lcd im sure its a couple hunder mA. i need a regulator that isnt going to require a heatsink. the main power supply for the 5v is normally a buck step down converter from 12v and it runs pretty cool. i dont have a lot of luck with the linear regulators as they get pretty hot sometimes. im also powering a nrf24+ card from 5v using a voltage divide not very efficient. the 5v source is not the arduino regulator either

The original Red Mcufriend shields used the 3.3V pin for logic level.
And used the 5V pin to supply the backlight via a separate large 3.3V regulator on the Shield pcb.

The current shield pcb omits the regulator. The current shield does not use 5V pin. It powers backlight and logic level via the tiny Arduino 3.3V regulator on Uno/Mega.

David.

eventually im going to 3d print my enclosure once i finish figuring out what components im going to use. i will de printing a bezel or the lcd screen but i hate how i can see the ribbon cable on the bottom portion of the screen. i need one that runs similar code so i wont have to port much of it. ive spent months customizing my code around this lcd screen

david_prentice:
The original Red Mcufriend shields used the 3.3V pin for logic level.
And used the 5V pin to supply the backlight via a separate large 3.3V regulator on the Shield pcb.

The current shield pcb omits the regulator. The current shield does not use 5V pin. It powers backlight and logic level via the tiny Arduino 3.3V regulator on Uno/Mega.

David.

i cant remember if mine has a regulator or not i think i remember seeing it when i peeled the lcd back from the shield but it is a red shield. im going to load test again but i cant do it right this second.

Most Portrait TFTs have the ribbon at the bottom of the screen.
A few have ribbons at left or right.

You will find it very difficult to use a solid bezel that touches the Touch Panel.
A soft rubber bezel might be ok.

I suggest that you consider a Capacitive Touch Panel if you want a neat assembly.

David.

p.s. you do not dismantle anything. The LDO regulator (if mounted) is clearly visible next to the microSD holder.