Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

How to calibrate touch screen display on STM32 board


Touch screen displays are common choice in many microcontroller projects. Touch capability won’t take additional space – it sits on top of LCD where you can directly interact with objects you see on screen. In order 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. Touch screen is analog device. It is made of two flexible resistive sheets with gap between. When screen is touched, a connection between sheets is made and thus measurement of voltage drop is taken. Normally resistive touch screen has four wire configuration. And normally there is a specialized IC used to take measurements and send data to MCU for processing. In our case we are dealing with ADS7843 touch screen controller, but in other systems this works pretty same way. The fact is that touch screen controller reads screen ADC values and simply passes them via 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 different resolution, different orientation, so data gathered from resistive touch screen must be scaled down to…

Continue reading