How to calibrate touch screen display on STM32 board

stm32_touch_screen_interface

Touch screen displays are a common choice in many microcontroller projects. Touch capability won’t take additional space – it sits on top of LCD to directly interact with objects you see on screen. To get this working, touch screen coordinates must match screen coordinates. So could be sure when you touch the point on screen you point where you want. The touch screen is an analog device. It is made of two flexible resistive sheets with a gap between them. When the screen is touched, a connection between sheets is made, and thus a measurement of voltage drop is taken. Normally resistive touch screen has a four-wire configuration. And normally, a specialized IC is used to take measurements and send data to MCU for processing. In our case, we are dealing with the ADS7843 touch screen controller, but in other systems, this works the pretty the same way. The fact is that the touch screen controller reads screen ADC values and passes them via the SPI interface. So all you get is raw ADC readings that are not lined up with LCD coordinates. As you know, LCD screens can be of different resolutions, different orientations, so data gathered from resistive…

Continue reading