Skip to content

Configuring Touch for STMPE610

Calvin Hass edited this page Feb 3, 2019 · 3 revisions

Overview > Configuring GUIslice > Touch >

Configuring STMPE610 Resistive Touch Handler

  • Touch mode selected by: DRV_TOUCH_STMPE610

The STMPE610 provides filtering and easy access to the raw touch readings. The software then is responsible for performing a remapping between the raw analog read values and the corresponding display coordinates.

Connection from MCU to Touchscreen

With the STMPE610 touch driver, there are three supported modes of connectivity:

  • Hardware I2C interface: ADATOUCH_I2C_HW 1
    • The I2C address is configured by ADATOUCH_I2C_ADDR
  • Hardware SPI interface: ADATOUCH_SPI_HW 1
  • Software SPI interface: ADATOUCH_SPI_SW 1
    • This particular mode has not been tested thoroughly.
    • It requires some additional configuration to define which pins should be used for the software SPI interface:
    • ADATOUCH_PIN_CS
    • ADATOUCH_PIN_SDI
    • ADATOUCH_PIN_SDO
    • ADATOUCH_PIN_SCK

Calibration

The STMPE610 uses calibration settings that are specific to your display, described in the following configuration parameters:

  • ADATOUCH_X_MIN
  • ADATOUCH_X_MAX
  • ADATOUCH_Y_MIN
  • ADATOUCH_Y_MAX

In order to determine these calibration settings, please run the examples/arduino/diag_ard_touch_calib sketch.

Configuring touch sensitivity

The touch sensitivity can be defined by the following parameters. In most cases the default setting can be used.

  • ADATOUCH_PRESS_MIN
  • ADATOUCH_PRESS_MAX

Testing your display

Run examples/arduino/diag_ard_touch_test to assess whether the touch handling is operating correctly.

Clone this wiki locally