cancel
Showing results for 
Search instead for 
Did you mean: 

Ressistive touch screen connection

Pkats.1
Associate II

Hey,

I want to use the stm32h743 mcu, and to connect with a touch screen interface RGB Bus.

in the EVB there is a capacitive touch screen.

Does someone used before a ressistive touch screen with the mcu, including a resistive touch controller ?

i would like to hear some recommendations.

thanks!

peleg

4 REPLIES 4

Touchscreen controllers tend to be pretty autonomous chips, usually connected through I2C, but otherwise entirely independent from the host mcu. So there's nothing like "this is the best touchscreen controller for STM32H7".

Pick one based on your requirements on speed, precision, cost, etc, read the documentation, get samples, implement the interface for a prototype, evaluate... the usual life cycle of any project.

JW

berendi
Principal

Resistive touch screens do not require a controller. A 4-wire resistive touch screen needs 2 ADC and 2 digital I/O pins, a 5-wire 1 ADC and 4 GPIOs. Any STM32 with enough pins can handle that.

Pkats.1
Associate II

hey, thank you for your answer.

i use 4 wire.

As i understand, there are 4 analog inputs, (Xp Xn Yp Yn) and 1 interrupt digital input when a touch occures.

what do i miss?

can you expain more ? why do no the a controller like AD7889?

if its helpful , i attech th D.s of the touch screen.

Best regards

Peleg

berendi
Principal

4-wire analog touch basics:

The 4 wires are called left, right, top, bottom.

To get the Y (vertical) position

  • set the top wire to GPIO output high
  • set the bottom wire to GPIO output low
  • set both left and right to GPIO analog mode
  • measure either left or right with the ADC, the value will be proportional to the Y position

To get the X (horizontal) position

  • set the right wire to GPIO output high
  • set the left wire to GPIO output low
  • set both top and bottom to GPIO analog mode
  • measure either top or bottom with the ADC, the value will be proportional to the X position

To determine whether it is touched

  • set both left and right to GPIO output low
  • set top and bottom to GPIO inputs, activate the internal pullup on one of them
  • if top or bottom reads 0, it is touched, otherwise not

There are more sophisticated methods to get the touch strength, but this is enough for starters.

Any STM32 can do that, if there are 2 ADC and 2 additional GPIO pins free. Of course I will not hold you back if you want to use an external controller for something that the MCU can do on its own.