Microcontrollers with a Touch-Sensing Interface



If your design has any sort of a user interface, you are probably well aware of the various types of touch- sensing interfaces that are taking over for traditional push buttons and switches. Touch interfaces have many benefits in style and usability. Among other benefits they can lower manufacturing costs and probably increase reliability. I use the term “probably” because there are a number of design factors that must be met to achieve this goal, but it is generally accepted that a well-designed touch interface will be more reliable than a mechanical switch array.

Application designers migrating to touch sensing interfaces (Figure 1) are looking for fairly rugged, low-cost, and power efficient solutions that are easy to integrate. Segmented LCDs have historically been a popular choice and continue to grow in a variety of medical and industrial applications. However, in recent years, there has been a significant rise in the use of graphical displays using TFT, OLED, and CSTN display technologies. Increasingly, these displays are using multi-touch operator interfaces, providing the intuitive menus, vivid graphics, and touch panel interaction users prefer.

Figure 1: A typical operator interface with discrete touch buttons.

Adding to the mix is the bring-your-own-device (BYOD) phenomenon, which is the business practice of permitting employees to bring and use personally owned mobile devices at their workplace, which include smartphones, tablet computers, and laptop PCs running touch-friendly operating systems such as Windows 8.

The most commonly used touch technologies are resistive, surface capacitive, projected capacitive, surface acoustic wave, bending wave, and infrared. Three of these are of getting lots of attention right now.

Resistive touch is rugged and less prone to electrical interference than the capacitive types. It relies on pressure to cause contact between two layers and those layers are not as transmissive as capacitance versions, so the display is not as bright. Nevertheless, they are versatile – they can be operated with a finger, a fingernail, a stylus or any other object – and can accept signatures.

There are two basic types of capacitance touch systems (Figure 2): projected capacitance and surface capacitance. Surface has the advantage of working with gloved finger – essential in some devices – but projected capacitance has much better resolution. Projected is the favorite at the moment.

Figure 2: The iPhone, in 2007, was one of the first smartphones to use a capacitive touchscreen.

The projected capacitive technology itself has two sensing methods; "self-capacitance" and "mutual capacitance." Mutual capacitance is the most frequently used, especially for screens larger than 3 inches, and it supports many or multi-touch, while self-capacitance is limited to two.

There are microcontrollers available with complete touch interfaces for segmented and graphic displays; some have a full graphics or LCD display controller on board as well. Let’s now examine a selection of touch interface MCUs, based on the touch technology used.

A few good touch interface MCUs

The EP9307 from Cirrus Logic (Figure 3) is a noteworthy processor with graphics control along with resistive touch control. It is an ARM920T-based, system-on-a-chip (SoC) with a large peripheral set targeted to a variety of applications like thin client computers, Internet radio, industrial computers, and specialized terminals.

Its resistive touchscreen interface uses a 12-bit A/D converter. The touchscreen interface performs all sampling, averaging, range checking, and control for a wide variety of analog touchscreens. This controller only interrupts the processor when a meaningful change occurs. It features support for four-, five-, seven-, or eight-wire analog resistive touchscreens.

Figure 3: The EP9307 is an ARM920T-based SoC from Cirrus Logic.

Texas Instruments makes a number of discrete touch controllers – both resistive and capacitive. But here we are looking only at MCUs. For a small touchscreen or a touch-button-array comprised of a 4 x 4 matrix of sensors, you might want to consider the low-power 16-bit MSP430G255. The device has up to 16 Kbytes of flash and 512 bytes of RAM, with eight 10-bit A/D inputs – four each for the vertical and horizontal dimensions of a touch sensor array. TI also offers a free capacitive touch library and a number a design kits with touchscreens for the MSP430. There is no graphics controller on this device.

The downside of using any microcontroller's conventional A/D converter 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.

The ATSAM4LC4AA from Atmel (Figure 4) has a LCD driver module with a capacity of up to thirteen segments and four common terminals. It also has a capacitive touch module (CATB) supporting up to 26 buttons.

Figure 4: Atmel's SAM4L series is a member of a family of flash microcontrollers based on the 32-bit ARM® Cortex™-M4 RISC processor running at frequencies up to 48 MHz.

This processor runs a Cortex-M4 at up to 48 MHz with zero wait states from flash and has a memory protection unit for improved reliability and safety. It features active current down to 90 μA/MHz with configurable voltage scaling. It has high performance and efficiency, with 28 coremarks/mA. What is more, it has 256 Kbytes of flash, 32 Kbytes of RAM, and a three-channel 12-bit A/D converter. The MCU has a USB port and the Peripheral Event System that allows peripherals to receive, react to, and enable peripheral events without CPU intervention. Asynchronous interrupts allow advanced peripheral operation in low-power modes.

Microchip’s 16-bit PIC24FJ256DA210 MCU features a graphics LCD controller with three hardware accelerators, a touch interface, and USB 2.0 OTG. The chip will handle 640 x 480 STN or TFT displays at 30 Hz, 16 bits/pixel. The device’s Charge Time Measurement Unit (CTMU) module provides accurate differential time measurement, facilitating a capacitive touch sensor interface using A/D converter channels. It has a time measurement resolution of 1 ns.

The part’s CPU yields 16 MIPS at 32 MHz and has an 8 MHz internal oscillator, 256 Kbytes of flash, and 96 Kbytes of SRAM. The MCU has a 17 x 17-bit single-cycle hardware multiplier, a 32 x 16-bit hardware divider, 16 x 16-bit working register array, and a C compiler optimized instruction set. It has twenty-four 10-bit 500 Ks/s A/D converter channels, three comparators and operates from 2.2 to 3.6 V.

There is a full development kit available for the PIC24FJ256, designated part DV164039 (Figure 5), which includes a 240 x 320 TFT display.

Figure 5: The Microchip DV164039-ND development kit.

The up and coming star in graphics type displays is projected capacitive. Projected capacitive touch sensors operate by measuring the tiny change in capacitance on an electrode due to the influence of a human finger or other object. According to Microchip, their projected-capacitive software works with a 10-bit A/D converter. The code is able to interpolate 128 points between sensor channels. As a reference, according to Microchip, 128 points on a 5 mm standard-pitch sensor gives an actual “interpolation pitch” of 39 µm. By comparison a human hair is on average 100 µm.

Freescale has a number of good choices when it comes to processors with graphic display drivers and touch interface control. Freescale’s free Xtrinsic Touch Sensing Software Suite (TSS) 3.0 supports a large number of Freescale MCUs that have the touch-sensing input (TSI) embedded hardware module.

The TSI module (Figure 6) is said to provide capacitive touch sensing detection with high sensitivity and enhanced robustness. Each TSI pin implements the capacitive measurement by a current source scan, charging and discharging the electrode, once or several times. A reference oscillator ticks the scan time and stores the result in a 16-bit register when the scan completes.

Figure 6: The Freescale TSI circuit.

The Freescale Kinetis MK70FN1M0VMJ15 MCU includes a 150 MHz Cortex-M4 core, a graphics LCD controller, a TSI touch controller, IEEE 1588 Ethernet MAC, USB 2.0 On-The-Go, and hardware encryption and tamper detection capabilities. It has 1 Mbyte of flash, 8-Kbyte instruction and data caches, and comes in 196- and 256-pin MAPBGA packages. K70 family devices include a single precision floating point unit and a NAND flash controller. 256-pin versions include a DRAM controller for system expansion. The chip’s graphics LCD controller supports up to 800 x 600 resolution.

Another MCU from Freescale worth considering is the 167 MHz, 32-bit ColdFire MCF52277 that provides a straightforward way to add support for graphical SVGA LCD interfaces and capacitive touchscreen control. The chip features 128K of SRAM along with USB and CAN modules and does not have internal flash. It does have serial boot flash and a flexible external bus, and it runs from a 1.4 V ~ 1.6 V supply. The chip’s LCD controller handles 24 bit/pixel, 60 Hz refresh up to SXGA (1280 x 1024) resolution, and three planes (XGA) + 1 cursor plane.

This MCU incorporates crossbar switch technology (XBS) for concurrent access to peripherals or RAM from multiple bus masters, along with a 16-channel DMA controller. It comes in a 196 MAPBGA package. An evaluation board (Figure 7) is also available, designated M52277EVB.

Figure 7: The Freescale M52277EVB ColdFire MCU evaluation board.

In summary, there are a number of good solutions for touch interfaces of various kinds. Engineers will find they can use A/D converters, a separate touch controller, or a controller integrated with a processor to read a touch display. It is important to remember that you will also need some very good software drivers. For more information on the MCUs and dev kits discussed in this article, use the links provided to access product pages on the Hotenda website.
Supplier