Go Down

Topic: 3.95 inch LCD touch screen ili9488 (Read 37665 times) previous topic - next topic

A.R.Ty

Hoi Diger67,

i used your lib and sample code from the mculib-file - and anything works fine :-)

Ho can i read in the touchpad (areas) - is this included in your lib ?

Doei
ARTy
Dum spiro, spero - if you find my posting helpful, please click my Karma :)

diger67

Hoi Diger67,

i used your lib and sample code from the mculib-file - and anything works fine :-)

Ho can i read in the touchpad (areas) - is this included in your lib ?

Doei
ARTy
Hi. No need to use the library to work with a touchscreen. UTACH if installed xpt2046, TochSkreen if it is connected directly to the Arduino.

A.R.Ty

Thx for the reply - do you have a part of code that shows a simple "Button" Request (i.e. 20 pix heigth/wide) ?
Regards
Dum spiro, spero - if you find my posting helpful, please click my Karma :)

david_prentice

Look at the Paint example.    It reads the Touch position.   Then checks if this is within one of the colour boxes or in the draw area.

The logic is pretty straightforward.     It is always worth averaging a few points so that you get a good intentional touch.

David.

Parimal_s

Hello, can someone help me..
I have question about ili9488.
In data sheet of ili9488, it's mentioned that it will operate best with 1.8 V for data transmission.
So, is it possible to drive it with more than 1.8V, say 3.3V? 3.3V is mentioned to be the maximum voltage.

Thanks in advance..

david_prentice

#20
Feb 06, 2016, 09:50 am Last Edit: Feb 06, 2016, 09:52 am by david_prentice
Most controllers have external pins that are 2.5V - 3.3V.    Internally they run at 1.8V.

Similarly with ARM chips.    The core runs at low voltage with small silicon geometries.   The outside world sees 3.3V.

Unless you are considering manufacture of your own TFT panels and bare dies,    the voltages do not really concern you.    Most people buy ready-made panels with mounted controllers.    e.g. just a tiny flex-ribbon.

The ready made panels will all run at 2.5V - 3.3V.    If you buy a panel that is on a Shield,   it probably has some extra level converters to allow it to tolerate the 5V from an Arduino.

The panels that are mounted on a pcb with a  20x2 header are 3.3V.    They must NOT be connected to 5V logic.

David.

mandgeo

I've recently bought this display from aliexpress.

LCD_ID_readreg sais...

Quote
reg(0x0000) 00 00   ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 54 80 66   Manufacturer ID
reg(0x0009) 00 00 61 00 00   Status Register
reg(0x00BF) 00 00 00 00 00 00   ILI9481, HX8357-B
reg(0x00D0) 00 00   Power Control
reg(0x00D2) 00 00 00   NVM Read
reg(0x00D3) 00 00 94 88   ILI9341, ILI9488
reg(0x00DA) 00 54 00   RDID1
reg(0x00DB) 00 80 00   RDID2
reg(0x00DC) 00 66 00   RDID3
reg(0x00EF) 00 00 00 00 00 00   ILI9327
reg(0x00B0) 00   RGB Interface Signal Control
reg(0x00B4) 00   Inversion Control
reg(0x00B6) 00 02 02 3B   Display Control
reg(0x00B7) 00   Entry Mode Set
reg(0x00F2) 00 58 04 12 02 22 22 FF 0A 90 14 88   Adjust Control 2
reg(0x00F6) 00 00 00   Interface Control
So, it's an ili9488. I've tested it with graphictest_kbv, from mcufrind_kbv and display it's working fine, but... i'm having trouble with the TOUCHSCREEN.

When I run the calibration sketches, in both of them, the points are pressing themselves. In paint sketch, all I can do is to draw a line in the middle of the screen.

The touchscreen was hit. That's how I've received it.

Is there any setting I could change to make the touchscreen work or that hit damaged it???

Thanks for your advice.

david_prentice

#22
Feb 07, 2016, 11:31 am Last Edit: Feb 07, 2016, 11:38 am by david_prentice
Yes,  you clearly have an ILI9488.

The Calibration sketch seems to give people a lot of trouble with the <TouchScreen.h> library from Adafruit.   I have modified the sketch to wait for a steady press.    I will attach the modified sketch to the Library download message.

Meanwhile,   you can just try the Paint sketch with the "calibration values" from my shield e.g.
Code: [Select]

    } else if (identifier == 0x9488) {
        name = "ILI9488";
        TS_LEFT = 904; TS_RT = 170; TS_TOP = 950; TS_BOT = 158;

Most TouchScreens will have a difference of about 750 between LEFT and RIGHT or TOP and BOTTOM.    So a guess like TS_LEFT = 900; TS_RT = 150; TS_TOP = 900; TS_BOT = 150; will be safe start.
If your stylus goes backwards or at 90 degrees,  it means your "guess" values need swapping.

David.

mandgeo

I've done some calibration by changing minpressure to ~40. The readings show ~750 difference top/bottom and under 100 left/right.

david_prentice

Just put in some guess values for left and right.

I am going out on my bike.   I will upload that sketch when I come back.

David.

david_prentice

I have attached the modified sketch here

This is the only difference:
Code: [Select]

bool ISPRESSED(void)
{
    // .kbv this was too sensitive !!
    // now touch has to be stable for 50ms
    int count = 0;
    bool state, oldstate;
    while (count < 10) {
        readResistiveTouch();
        state = tp.z > 20 && tp.z < 1000;
        if (state == oldstate) count++;
        else count = 0;
        oldstate = state;
        delay(5);
    }
    return oldstate;
}


If you are worried that your Touchscreen is broken,   simply measure the resistance between A1, D7 and A2, D6 with your multimeter.    It should be 300R to 500R.    If the screen is cracked,  you will not get a valid tp.z value and hence no "pressed" will work.

Please let me know if this helps you.    Others have found the Calibration difficult or unreliable.    It would be useful to know your experience.

David.

mandgeo

#26
Feb 07, 2016, 03:31 pm Last Edit: Feb 07, 2016, 04:26 pm by mandgeo
I'm getting ~700-800 ohms between A1 and D7 and ~6 kilo ohms between A2 and D6

L.E.  And I think that the problem between A1 and D7. I've made the sketch to print the voltage on A1 and A2.

On A1 I'm getting a steady reading of ~4.3 volts.
On A2 I'm getting zero when touch is not pressed and 3.2 -> 3.7 on the longer side.

david_prentice

6k0 is far too much for a Touch screen.

It is possible but unlikely that the XM, XP are connected to different pins.   Try A2 with D5, D6, D8, D9.

Otherwise,  you will just need to accept that you have a broken Touch panel.

David.

mandgeo

Maybe it's just bad luck.

I can trace the lines that goes to digital and they are d7 and d6.

The analog are a little hidden, but two lines can be traced to a1 and a2.

gzcwnk

Hi I have a 3.95inch screen but when I compile I get,

ADA_GFX_kbv.h as a fatal error as its missing.

=============
Read Registers on MCUFRIEND UNO shield
controllers either read as single 16-bit
e.g. the ID is at readReg(0)
or as a sequence of 8-bit values
in special locations (first is dummy)

reg(0x0000) 00 00   ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 00 54 80 66   Manufacturer ID
reg(0x0009) 00 00 61 00 00   Status Register
reg(0x00BF) 00 00 00 00 00 00   ILI9481, HX8357-B
reg(0x00D0) 00 00   Power Control
reg(0x00D2) 00 00 00   NVM Read
reg(0x00D3) 00 00 94 88   ILI9341, ILI9488
reg(0x00DA) 00 54 00   RDID1
reg(0x00DB) 00 80 00   RDID2
reg(0x00DC) 00 66 00   RDID3
reg(0x00EF) 00 00 00 00 00 00   ILI9327
reg(0x00B0) 00   RGB Interface Signal Control
reg(0x00B4) 00   Inversion Control
reg(0x00B6) 00 02 02 3B   Display Control
reg(0x00B7) 00   Entry Mode Set
reg(0x00F2) 00 58 04 12 02 22 22 FF 0A 90 14 88   Adjust Control 2
reg(0x00F6) 00 00 00   Interface Control
==============

Go Up