Give away medical masks when you place an order. learn more

Assessing and Selecting a Touch Screen Controller Implementation

The history of touch screen interface development is a topic that has already been discussed in prior TechZoneSM articles, as has the comparative construction of resistive and capacitive touch screens, the two most common types in use today. But how do assemblage differences translate into relative strengths or shortcomings for your next design? This article will discuss key factors that can guide your selection of one or the other, as well as of sub-types within each technology category.

Historically, the resistive touch screen was the dominant type in use, and it remains the technology of choice for specific applications. It is largely ambient-EMI immune, and being pressure-activated, a wide variety of input devices, made of a diversity of materials (such as gloved fingers and styli), can successfully manipulate it.

Conversely, a capacitive touch screen is inherently prone to being inadvertently 'activated' by nearby high-EMI 'broadcasters' and requires a conductive input source. A capacitive touch screen's operation also tends to become erratic when water is present on the display bezel or, more generally, in high humidity environments. Resistive touch screens are not particularly prone to such moisture-related problems; however, you can inadvertently activate them via the pressure of a cleaning cloth (whose static charge accumulation, on the other hand, might cause undesirable capacitive touch screen operation). Another notable variance involves translucence; resistive touch screens tend to have 80 percent or less light transmission capability, whereas capacitive touch screens' transparency factor is 90 percent or higher, leading (in the former case) to the need for a brighter, more power-consuming, and potentially thicker backlight for a given resultant display luminance metric.

Interface implementation diversity

The other notable differentiation between resistive and capacitive touch screens involves system implementation complexity, both from hardware interface and software algorithm standpoints. With a resistive touch screen, you sequentially sense the horizontal- and vertical-orientation voltage gradient values resulting from a press-activated 'short circuit' between the two parallel layers of conductive material, thereby estimating the touch input device's 'x' and 'y' coordinate positions. As has been documented, it is possible to accomplish this task, utilizing the common four-wire resistive touch screen approach by means of four microcontroller GPIOs, each configurable as either a TTL output or as an A/D input (Figure 1).

Figure 1: The hardware interface to a conventional resistive touch screen requires only four microcontroller GPIOs, selectively configured as TTL outputs or A/D inputs.

  X1 X2 Y1 Y2
To measure X position Logic High Logic Low (GND)   ADC
To measure Y position ADC   Logic Low (GND) Logic High

Table 1: Resistive touchscreen interface configurations

Writing In his engineering blog, Dhaval Mehta describes how he employed NXP Semiconductors' LPC2148, an ARM7TDMI-S based 32-bit RISC microcontroller with Thumb extensions, 512 Kbytes of on-chip flash memory, and 32 Kbytes of RAM. Presumably, he chose the LPC2148 based on university laboratory or other prior familiarity with the product, because, if you peruse his sample C algorithm code, you will see that it is equally applicable to more elementary microcontroller architectures from a diversity of suppliers sourced by Hotenda. A faster CPU will enable more frequent scanning of the touch screen and therefore more rapid response to touch input activations. The somewhat more costly five-wire resistive touch screen, with improved accuracy and reliability versus the four-wire alternative, incurs proportionally more involved (but still quite modest) hardware interface requirements.

What if you would like to implement a design incorporating a capacitive touch screen? In this particular case, you will require additional A/D interface input pins. For a small touch screen or touch button array comprised of a 4x4 matrix of sensors, for example, you might want to consider Texas Instruments' 16-bit MPS430G2xx microcontrollers, which range in size up to 16 KB of flash memory and 512 bytes of RAM, and include eight 10-bit A/D inputs, four each for the vertical and horizontal dimensions of the touch sensor array.

Texas Instruments offers a free capacitive touch library to speed and otherwise simplify your code development efforts, as well as a development hardware module. For a larger touch screen configuration, check out Microchip Technologies' 8-bit PIC XLP 18F microcontroller series, which embeds 13 A/D converter inputs and therefore supports 42-sensor (i.e.,. 6x7 array) touch sensor matrix configurations (Figure 2).

Figure 2: Microchip Technology's PIC XLP 18F devices embed a CTMU (charge time measurement unit), which enables a speedy response to touch interface inputs while still keeping the bulk of the microcontroller in low-power modes as much as possible.

The downside of using any microcontroller's conventional A/D converters for capacitive touch interfacing is that the microcontroller must be 'awake' and regularly scanning the sensor array in order to quickly sense and respond to user input actions. Microchip's PIC XLP 18F, on the other hand, integrates a touch application-optimized CTMU (charge time measurement unit), which provides automated sensor array scanning even if the microcontroller is otherwise in a non-active, lower-power consuming mode. Texas Instruments has made similar, touch-optimized enhancements to its MPS430G2xx devices, which support pin oscillation, thereby enabling low-cost touch sensing with no external components.

The peripheral option

More elaborate resistive and capacitive touch setups, however, will likely outstrip the interface and processing capabilities integrated within a microcontroller. In these cases, you will need to consider a standalone co-processor, which handles the bulk of the touch interface hardware and software tasks, and subsequently passes its results on to the system controller. Companies such as Cypress Semiconductor, with its PSoC-based TrueTouch products (e.g. CY8CTMG110-32LTXI), supply examples of this application-specific IC category (Figure 3).

Figure 3: More elaborate touch screen configurations and implementations beg for a dedicated-function controller such as a Cypress TrueTouch device.

Perhaps obviously, you will need to consider a dedicated touch controller if your design employs a touch sensor matrix configuration with more array signals than a conventional microcontroller has A/D inputs (either to cover a larger display surface area or to enable finer touch precision), or if you require a deterministic (and speedy) response to touch input activations. However, these are not the only reasons why you might want to leverage a dedicated touch controller versus burdening the system CPU with the task, in spite of the potentially larger bill of materials cost, board space, or overall power consumption incurred with such an approach.

Consider, for example, that more elaborate capacitive touch algorithms, enabled by dedicated controllers, facilitate operation even in high ambient EMI environments, as well as moist ones. High-precision capacitive touch sensors, mated to equally robust software routines, can even discern a finger approaching a display but not yet in contact with it, which opens up some interesting application enhancements. For example, these enhancements could include the ability to proximity-awaken the bulk of a system's circuitry, for example, or to implement a displayed mouse cursor which moves in sync with a hovering fingertip and 'clicks' in response to a subsequent touch.

Speaking of EMI, remember that many users desire to use their touchscreen-inclusive widgets not only when the devices are battery-powered, but also when they are tethered to low-cost AC/DC 'wall wart' adapters, which tend to inject all sorts of undesirable spikes and other noise artifacts into the system power plane. Users will also welcome your support for false-positive input filtering, including unintentional finger brushes, palms of hands resting on large-screen panels, or the earlier-mentioned pressure caused by a cleaning cloth.

Finally, determine upfront whether or not multi-touch support is necessary, as this decision will single-handedly impact the integrated-versus-standalone touch controller design trajectory. Multi-touch interfaces are 'trendy', and your users may admittedly expect to find them; two-finger sweeps together to zoom out a displayed map or photo, for example, and apart to zoom in. However, multi-touch support will require not only more expensive hardware (the mutual-capacitance variant of a projected-capacitance touch screen, versus its self-capacitance sibling, for example), but also more elaborate software routines. Your target users may tolerate single-digit-activated, on-screen "+' and '-' magnifying glass icons instead.


This article has presented the key elements you need to consider when assessing and selecting a touch screen controller implementation. We reviewed the different available interfaces, examined microcontroller and stand-alone peripheral options, and discussed parts from NXP, Microchip, TI, and Cypress Semiconductor. You can obtain more information by utilizing the links provided to these product’s pages on the Hotenda website.