Skip to content

Touch not working #34

@Me-Phew

Description

@Me-Phew

I am using the default wiring pinout with a ILI9486 display. The screen is working correctly but for some reason no touch is ever detected. I have verified all pin numbers and connections. Also touch is actually working correctly without any wiring or pin number modifications using a different library made for Arduino framework.

Relevant part of sdkconfig

# TFT Configuration
CONFIG_ILI9486=y
CONFIG_INTERFACE_GPIO=y
CONFIG_WIDTH=320
CONFIG_HEIGHT=480
CONFIG_OFFSETX=0
CONFIG_OFFSETY=0
CONFIG_ENABLE_TOUCH=y
CONFIG_ADC_CHANNEL_YP=6
CONFIG_ADC_CHANNEL_XM=7
CONFIG_XP_GPIO_D6=y
CONFIG_XM_GPIO_RS=y
CONFIG_YP_GPIO_WR=y
CONFIG_YM_GPIO_D7=y
# end of TFT Configuration

Program startup log:

I (594) LCD_COM: LCD_CS_PIN=33
I (594) gpio: GPIO[33]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (604) LCD_COM: LCD_RS_PIN=15
I (614) gpio: GPIO[15]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (614) LCD_COM: LCD_WR_PIN=4
I (624) gpio: GPIO[4]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (634) LCD_COM: LCD_RD_PIN=2
I (634) gpio: GPIO[2]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (644) LCD_COM: LCD_D0_PIN=12
I (644) LCD_COM: LCD_D1_PIN=13
I (654) LCD_COM: LCD_D2_PIN=26
I (654) LCD_COM: LCD_D3_PIN=25
I (654) LCD_COM: LCD_D4_PIN=17
I (664) LCD_COM: LCD_D5_PIN=16
I (664) LCD_COM: LCD_D6_PIN=27
I (674) LCD_COM: LCD_D7_PIN=14
I (674) LCD_COM: INTERFACE is GPIO
I (674) gpio: GPIO[12]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (684) gpio: GPIO[13]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (694) gpio: GPIO[26]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (704) gpio: GPIO[25]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (714) gpio: GPIO[17]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (724) gpio: GPIO[16]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (734) gpio: GPIO[27]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (744) gpio: GPIO[14]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (754) LCD_COM: LCD_RESET_PIN=32
I (754) gpio: GPIO[32]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (764) main_task: Returned from app_main()
I (964) ILI9486: Your TFT is ILI9486.Same as ST7796
I (964) ILI9486: Screen width:320
I (964) ILI9486: Screen height:480
I (1264) LCD_COM: _adc_yp=0 _adc_xm=1073448112
I (1264) LCD_COM: _gpio_xp=27 _gpio_xm=15
I (1264) TouchGetCalibration: Opening Non-Volatile Storage (NVS) handle...
I (1264) TouchGetCalibration: Opening Non-Volatile Storage (NVS) handle done
I (1274) TouchGetCalibration: nvs_get_i16(calibration)=4354
I (1284) TouchCalibration: TouchGetCalibration=0
I (547014) TouchCalibration: counter=0 _xp=1 _yp=1 xp=-32768 yp=32767
I (547034) TouchCalibration: counter=1 _xp=1 _yp=2 xp=1 yp=1

Could _adc_xm=1073448112 have sth to do with it? It doesn't really look correct.
The counter values shown at the end weren't actually caused by touch but rather by moving the cables which also seems strange.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions