ID 434L: Incorporating a Capacitive Touch Interface into Your Design

Similar documents
Incorporating a Capacitive Touch Interface into Your Design

Capacitive Touch Based User Interfaces and Hardware-based Solutions

ID 411C: Capacitive Touch User Interfaces and Hardwarebased

Rapid RX600 System Development Using the RPDL and PDG

ID 024C: Auto Code Generation: The Shortest Distance From Idea to Implementation

A11L: 78K0R Low Power MCU

ID 020C: Hardware-in-Loop: System Testing Without the System

ID 321L: KPIT GNU compiler plug-ins for HEW / KPIT Eclipse IDE

ID 220L: Hands-on Embedded Ethernet Design with an Open Source TCP/IP Stack

ID 730L: Getting Started with Multimedia Programming on Linux on SH7724

ID 025C: An Introduction to the OSEK Operating System

ID B34L: HMI Development with QNX'S Momentics Toolchain and Connected Automotive Reference QNX CAR

Low Power Design. Renesas Electronics America Inc Renesas Electronics America Inc. All rights reserved.

Low Power Design Michael Thomas, Applications Engineer

RL78 Project Configuration Tips

ID B30C: IP Video Surveillance Applications

Implementing Bootloaders on Renesas MCUs

RL78 Ultra Low Power MCU Lab

Wcapacitive-touch controls for

CAN In A Day 2L01I. Renesas Electronics America Inc Renesas Electronics America Inc. All rights reserved.

Embedding Audio into your RX Application

RL78 Ultra Low Power MCU Lab

Hello, and welcome to this presentation of the STM32 Touch Sensing Controller (TSC) which enables the designer to simply add touch sensing

Renesas New Generation of R8C/Tiny Series MCUs Adds 1.8V Support and Coprocessing With Background Operation to Enable Low-cost Innovative Designs

Secure Firmware Update Lab Session

STM8 platform 8-bit microcontrollers

TEVATRON TECHNOLOGIES PVT. LTD Embedded! Robotics! IoT! VLSI Design! Projects! Technical Consultancy! Education! STEM! Software!

ID 810C: Renesas On-line Virtual Power Laboratory Renesas VP

422L: Introduction to the.net Micro Framework

Renesas Synergy MCUs Build a Foundation for Groundbreaking Integrated Embedded Platform Development

Hello, and welcome to this presentation of the STM32L4 power controller. The STM32L4 s power management functions and all power modes will also be

AT-501 Cortex-A5 System On Module Product Brief

Today: Multi-touch capacitive touch screens How do they work?

Course Introduction. Purpose: Objectives: Content: Learning Time:

Let s first take a look at power consumption and its relationship to voltage and frequency. The equation for power consumption of the MCU as it

2-Oct-13. the world s most energy friendly microcontrollers and radios

AS Channels Capacitive Touch Sensor IC From Santa Clara, United States of America

Workbench V Integrated Development Environment for Renesas Capacitive Touch

LED1 LED2. Capacitive Touch Sense Controller LED3 LED4

8051 Microcontroller

Signal Integrity Comparisons Between Stratix II and Virtex-4 FPGAs

Hello and welcome to this Renesas Interactive module that provides an overview of the RX DMA Controller

Xtrinsic Touch Sensing Software 2.0 Add touch. With flexible libraries.

Optimizing RX Performance

Using Software Building Blocks for Faster Time to Market

ID 216C: Go Wireless with Redpine and Renesas Wi-Fi Solutions

An Introduction to e 2 studio

Ultra Low Power Microcontroller - Design Criteria - June 2017

ID B33C: Developing Rich Graphical User Interfaces Optimized for Embedded Systems

Smart Capacitive Sensing Design with EFM8 TM and Simplicity Studio TM

Battery Stack Management Makes another Leap Forward

ECG (EKG) Primer Jingxi Zhang ABSTRACT

TouchCore351-ML16IP. Capacitive Touch Sensor Controller

Introducing: New Low-Cost & Low Pin Count PIC Microcontrollers for the 8-, 16- & 32-bit Markets

Mechatronics and Measurement. Lecturer:Dung-An Wang Lecture 6

Approximately half the power consumption of earlier Renesas Technology products and multiple functions in a 14-pin package

Low Power System Design Using Atmel ARM Cortex -based Products Copyright Atmel Corporation

Capacitive Touch Remote Control Reference Design User s Guide

STM32F3. Cuauhtémoc Carbajal ITESM CEM 12/08/2013

The following table lists user modules used in this code example and the hardware resources occupied by each user module.

STM32F429 Overview. Steve Miller STMicroelectronics, MMS Applications Team October 26 th 2015

STM32G0 MCU Series Efficiency at its Best

Hello and welcome to this Renesas Interactive module that provides an architectural overview of the RX Core.

CY3280-BBM Universal CapSense TM Prototyping Module Kit Quick Start

F 2 MC-16FX -16bit CISC- F 2 MC-16LX -16bit CISC- F 2 MC-8FX -8bit CISC- F 2 MC-8L -8bit CISC-

NXP Cortex-M0 LPC1100L Design with a Cortex-M0 in a DIP package ASEE Tech Session. Sergio Scaglia (NXP Semiconductors) August 2012

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction.

The Software of Things T Y S O N T U T T L E C E O S I L I C O N L A B S A S P E N C O R E C E O S U M M I T S H E N Z H E N 8 N O V E M B E R 2018

STM32 Cortex-M3 STM32F STM32L STM32W

Memory Expansion. Lecture Embedded Systems

Shield electrode support for reliable operation in the presence of water film or droplets.

LibUSB - Create a Solution Without the Class Struggle

Clock and Fuses. Prof. Prabhat Ranjan Dhirubhai Ambani Institute of Information and Communication Technology, Gandhinagar

PSoC 4 Capacitive Sensing (CapSense CSD)

WHICH MICRO? What does MCU needs to do in my system? What are the tasks? Dr. Adriana Becker-Gomez

THE LPC84X MCU FAMILY A MULTI-TESTER TOOL OFFERING FEATURES FOR YOUR NEXT IOT DESIGN

XMEGA Series Of AVR Processor. Presented by: Manisha Biyani ( ) Shashank Bolia (

5th Generation Touchscreen Controller for Mobile Phones and Tablets. Hot Chips 2013 Milton Ribeiro John Carey August, 2013

E3B USER'S GUIDE. for QT310 / QT320 QProx IC evaluation and development Overview. Fast Start

Typical Applications: GHz Bluetooth low energy systems - Proprietary 2.4 GHz systems - Sports and leisure equipment - Mobile phone accessories,

Renesas 78K/78K0R/RL78 Family In-Circuit Emulation

Interconnects, Memory, GPIO

PSEC-4: Review of Architecture, etc. Eric Oberla 27-oct-2012

New STM32 F7 Series. World s 1 st to market, ARM Cortex -M7 based 32-bit MCU

EMBEDDED SYSTEMS COURSE CURRICULUM

ILI2511. ILI2511 Single Chip Capacitive Touch Sensor Controller. Specification ILI TECHNOLOGY CORP. Version: V1.4. Date: 2018/7/5

Techniques for Optimizing Performance and Energy Consumption: Results of a Case Study on an ARM9 Platform

AT90SO36 Summary Datasheet

Shield electrode support for reliable operation in the presence of water film or droplets.

Welcome to the Controller Continuum Only from Freescale

MICROCONTROLLER BASED SMART FAN SYSTEM

s132_nrf52 release notes

FUNCTIONAL SAFETY FOR INDUSTRIAL AUTOMATION

Introduction. Purpose. Objectives. Content. Learning Time

Automatic SmartSense tuning or manual tuning with integrated PC GUI. High immunity to AC power line noise, EMC noise, and power supply voltage changes

Raspberry Pi - I/O Interfaces

S-Touch controllers. Ultra-low-power solution for touch sensing. April

AT90SDC10X Summary Datasheet

Welcome to this Renesas Interactive course which covers migration from the the V850 Jx3 series of 32bit MCUs to the Jx4 Series.

Support for user-defined combinations of button, slider, touchpad, and proximity capacitive sensors

Transcription:

ID 434L: Incorporating a Capacitive Touch Interface into Your Design Renesas Electronics America Inc. Jim Page Senior Applications Engineer 12 & 13 October 2010 Version: 1.1 1

Jim Page Senior Applications Engineer Developed reference designs with Renesas Capacitive Touch Solution Applications Engineering Support for Renesas Capacitive Touch Author of Application notes on Renesas Capacitive Touch B.S. EET from Western Carolina University Go Catamounts!! Expert in Serial (I2C, SPI, others) and USB technologies Co-patent holder and developer of original Renesas Flash-Over-USB technology Contributor to USB Design by Example, 2 nd ed. by John Hyde from Intel Press Created platform code key to USB certification requirements and silicon development Key support and development role for several successful projects being used in-field today 2 2

Renesas Technology and Solution Portfolio Microcontrollers & Microprocessors #1 Market share worldwide * ASIC, ASSP & Memory Advanced and proven technologies Solutions for Innovation Analog and Power Devices #1 Market share in low-voltage MOSFET** * MCU: 31% revenue basis from Gartner "Semiconductor Applications Worldwide Annual Market Share: Database" 25 March 2010 ** Power MOSFET: 17.1% on unit basis from Marketing Eye 2009 (17.1% on unit basis). 3 In the session 110C, Renesas Next Generation Microcontroller and Microprocessor Technology Roadmap, Ritesh Tyagi introduces this high level image of where the Renesas Products fit. The big picture.

Renesas Technology and Solution Portfolio Microcontrollers & Microprocessors #1 Market share worldwide * ASIC, ASSP & Memory Advanced and proven technologies Solutions for Innovation Analog and Power Devices #1 Market share in low-voltage MOSFET** * MCU: 31% revenue basis from Gartner "Semiconductor Applications Worldwide Annual Market Share: Database" 25 March 2010 ** Power MOSFET: 17.1% on unit basis from Marketing Eye 2009 (17.1% on unit basis). 4 This is where our session, 411C Capacitive Touch User Interfaces and Hardware-based Solutions is focused within the Big picture of Renesas Products

Microcontroller and Microprocessor Line-up Superscalar, MMU, Multimedia Up to 1200 DMIPS, 45, 65 & 90nm process Video and audio processing on Linux Server, Industrial & Automotive High Performance CPU, Low Power Up to 500 DMIPS, 150 & 90nm process 600uA/MHz, 1.5 ua standby Medical, Automotive & Industrial High Performance CPU, FPU, DSC Up to 165 DMIPS, 90nm process 500uA/MHz, 2.5 ua standby Ethernet, CAN, USB, Motor Control, TFT Display Legacy Cores Next-generation migration to RX General Purpose Ultra Low Power Embedded Security Up to 10 DMIPS, 130nm process 350 ua/mhz, 1uA standby Capacitive touch Up to 25 DMIPS, 150nm process 190 ua/mhz, 0.3uA standby Application-specific integration Up to 25 DMIPS, 180, 90nm process 1mA/MHz, 100uA standby Crypto engine, Hardware security 5 5

Microcontroller and Microprocessor Line-up R8C Superscalar, MMU, Multimedia Up to 1200 DMIPS, 45, 65 & 90nm process Video and audio processing on Linux Server, Industrial & Automotive Capacitive High Performance CPU, Low Power Touch Solution Up to 500 DMIPS, 150 & 90nm process 600uA/MHz, 1.5 ua standby Medical, Automotive & Industrial High Performance CPU, FPU, DSC Up to 165 DMIPS, 90nm process 500uA/MHz, 2.5 ua standby Ethernet, CAN, USB, Motor Control, TFT Display Legacy Cores Next-generation migration to RX General Purpose Ultra Low Power Embedded Security Up to 10 DMIPS, 130nm process 350 ua/mhz, 1uA standby Capacitive touch Up to 25 DMIPS, 150nm process 190 ua/mhz, 0.3uA standby Application-specific integration Up to 25 DMIPS, 180, 90nm process 1mA/MHz, 100uA standby Crypto engine, Hardware security 6 6

Switches 7 7 Basic Switch 7

Switches 8 8 Another familiar basic switch 8

Switches 9 9 My favorite switch 9

Renesas Capacitive Touch Innovation Renesas provides you a complete hardware, software, and tool solution for implementing capacitive touch technology into your embedded designs. 10 10 We re really here to talk about Capacitive Touch switches however and how Renesas can bring the application of this innovative technology to your embedded designs. Renesas provides you a complete hardware, software, and tool solution for implementing capacitive touch technology into your embedded designs. 10

Course Agenda Touch Basics Touch Detection Creating a Digital Touch Renesas Hardware Overview Renesas Touch Solution Application View Renesas Software Available Tools Lab Overview Lab Time!! Wrap-up and questions 11 11 Course agenda: Touch Basics Renesas Touch Solution Overview Lab overview Wrap-up and questions Lab Time!! 11

Touch Basics 12 12 12

Capacitive Touch Detection Methods Mutual Capacitance * Power Consumption: Medium/High Emissions: Medium/High Immunity: Medium/High Self Capacitance * Power Consumption: Low Emissions: Low Immunity: Medium 13 * Attributes may vary depending on implementation 13 Let s quickly review a couple of methods used in capacitive touch detection. These are: Mutual Capacitance and Self Capacitance. Principle: detect change in capacitance on an electrode/sensor Methods: 1) Mutual capacitance One Transmission Node and One Reception Node Finger decreases electric field. (Energy absorbed by finger) Pulse-generating structure can get very complex. Shielding can provide good noise tolerance. 2) Self Capacitance: Measures the floating capacitance of the touch electrode connected to the measurement terminal. There exist parasitic capacitances between the electrode and the surrounding electric conductors. Because the human body is an electrical conductor, when a finger is placed close to the electrode, the value of the floating capacitance increases. Change in floating capacitance determines whether the electrode is being touched or not. One Reception Node Finger increases parasitic capacitance. Very Simple to implement. Shielding is generally Not Allowed. The Renesas capacitive touch solution uses self-capacitance method to detect touch. While this is the methodology, let s look how it looks and how we can implement it in practice 13

Touch Basics Simple Touch System Sensor Electrode pad Connecting traces Capacitive Component Earth Enclosure PCB + Components Overlay 14 14 A capacitive touch system can be broken down into some simple components. These are: Touch Sensor Electrode Pad any connecting traces If we take a look at a touch sensor, here s how it would look electrically. There are stray/parasitic capacitances all around a typical sensor electrode. These include Earth the enclosure, the PCB, the trace materials overlay used to protect the PCB 14

Touch Basics Make it simple Lump them together Create combined cap ) 15 15 Simplifying this, we can lump these stray capacitances into one unit that we ll call a Parasitic capacitance 15

Quick Question Q: Based on this self capacitance method, what are some ways that you would measure the change in capacitance of that sensor pad to detect a touch? A: Create a simple RC charge circuit that will charge the system to a known voltage and discharge it at accurate rate. The change in C will effect the discharge curve in a measureable fashion. 16 16 16

Touch Basics Simple RC Circuit Comparison Capacitor Charge/Discharge Resistor Charge Capacitor 17 17 Now, let s construct this simple RC measurement circuit As you can see, we add 3 passive components to complete the RC circuit. These are: Charge Capacitor: The storage capacitor for charging and discharging the total circuit Charge/Discharge Resistor: Controls the rate at which the circuit charges and discharges Comparison Capacitor: Sample capacitor connected to the sensor pad that creates a voltage measurement point during the discharge phase. Creating simple terms for the components, we have: Cc Rc Cr Cx 17

Touch Basics Add control components 18 18 Now that we have our RC circuit defined, we need to add come simple charge/discharge control to it. We can do that by adding switches to the circuit in the places shown in the above graphic. Now, let s cycle the switches, apply some voltage and see what comes our of this circuit 18

Touch Basics Charge circuit 19 19 First, let s close the Charge Switch This will quickly charge the RC circuit to a known potential based on the amount of time that we keep the switch closed. 19

Touch Basics Charging Completed 20 20 We then open the charge switch after a pre-determined amount of time. 20

Touch Basics Discharge Circuit 21 21 Now, we begin to discharge the RC circuit by cycling the other switches in the circuit. Doing this at a consistent rate allows up to create an RC waveform which we can measure thru any number of methods This waveform looks as follows 21

Quick Question Q: Now that we ve created this RC charge/discharge circuit, what happens to the curve when we touch the pad? A: Touching the sensor pad causes an increase to the lumped capacitance that is seen by the RC circuit. This causes the RC waveform to change it s charge/timing characteristics in a measurable fashion. 22 22 Now that we ve created this RC charge/discharge circuit, what happens to the curve when we touch the pad? Touching the sensor pad causes an increase to the lumped capacitance that is seen by the RC circuit. This causes the RC waveform to change it s charge/timing characteristics in a measurable fashion. 22

Touch Basics Object Introduction Adds Capacitance Few pf Very Small mv of difference 23 23 It s important to remember that we re dealing with very small changes here Introducing an object to the sensor pad typically results in a very small change in capacitance, typically only a few pf of capacitance is added to the circuit The effect on the voltage charge/discharge curve is very small, usually on the order of mv of difference when sampled 23

Quick Question Q: What might be an easy way to detect a touch measuring the RC circuit A: Sampling the voltage to some threshold could allow us to detect touch. Let s Check it out!! 24 24 Now that we ve created this RC charge/discharge circuit, what happens to the curve when we touch the pad? Touching the sensor pad causes an increase to the lumped capacitance that is seen by the RC circuit. This causes the RC waveform to change it s charge/timing characteristics in a measurable fashion. 24

Touch Analog to Digital Sampling Create counts vs. threshold 25 25 Sampling the waveform opens up the ability for us to detect touch. When we sample over time, we can see that we can easily see the difference between a no-touch condition and a touch condition even with this small voltage change on the RC waveform Let s use the terms counts and threshold to help define a touch Counts refers to the time it takes for the RC waveform to cross a certain voltage level Threshold voltage is just that, the adjustable level at which the counts are sampled against. 25

Touch Analog to Digital Counts vs. Time 26 If we were to lay the count values sampled from the RC waveform vs. time, then we can effectively turn the touch detection into a graphical representation of a touch event. What s important is that by creating this graphical look at the touch event, we have now translated the touch from the analog world to the digital world in an easy to process format. 26

Touch Analog to Digital 27 27 If we were to lay the count values sampled from the RC waveform vs. time, then we can effectively turn the touch detection into a graphical representation of a touch event. What s important is that by creating this graphical look at the touch event, we have now translated the touch from the analog world to the digital world in an easy to process format. We can also assign more useful values and ranges that will be used further in the application of the Renesas touch solution. Let s quickly review these. Counts numerical level at which the sampled voltage waveform crosses an adjustable value Reference average count value at which the voltage waveform falls below a preset value Threshold configurable count value at which the voltage waveform falls below and indicates a touch on the sensor pad Hysteresis level at which the count value must remain below after crossing the threshold to indicate a touch Moving forward, let s look at some hardware methods to perform this task. 27

The Sensor Control Unit (SCU) 28 28 28

Why Develop Hardware? How could we control the switches shown in the diagram? Would our timing need to be accurate? How would you measure the discharge curve voltage? 29 29 Why would we want to develop H/W? (Ask audience) How could we control the switches shown in the diagram? Would our timing need to be accurate? How would you measure the discharge curve voltage? As we ve seen previoulsy, we do need to control our switches in an accurate manner. Timing is important in order to sample the RC curve. We can do the switching overhead with typical GPIO ports, use the MCU to give us this accurate timing, and use an onboard ADC to measure the voltage at the required intervals to produce our digital waveform. 29

Why Develop Hardware? (continued) CPU used 100% in software solution CPU in R8C/3xT Fully stopped Or system functions Less than 15% CPU usage Softwarebased solution CPU CPU Active (Touch Scanning) CPU Active (System Functions) R8C/3xT Option A CPU SCU Not Operating Scanning + Data Transfer CPU Active (Touch Post Processing) R8C/3xT Option B CPU SCU CLK System Functions Scanning + Data Transfer Less than 15% of total CPU time (20MHz) 30 Software-based solution requires CPU to operate constantly during scanning and processing R8C/3xT CPU can be stopped completely during scanning, or can perform other operations Less than 5msec to scan and process 18ch Scan Time: 4ms Decoding Time: 500us (@ 20MHz) Total Time: 4.5ms % of CPU used = 500us/4.5ms = ~11% A bigger advantage of integrating the sensing as a peripheral into the MCU is the MCU bandwidth required to implement the solution. In the pure software solution the MCU must control the ports to charge, discharge and test the circuit. During this control sequence the MCU is not available to do other tasks and to ensure the touch algorithm is properly implemented interrupts should not be taken during this time. By integrating a sequencer to control and test the ports the MCU is free to perform other tasks during that time. The timing references in Figure 2 show that the time for the SCU to scan 18 channels is around 4-5 msec, the time to process that data is less than 400 usec. Even when matrix decoding, debounce and other high level filters are added the time required to process the scan data should be less than 500 us. The MCU core is not required for the SCU to scan the channels so it is available during the SCU scan time to perform other tasks. This indicates that with the MCU running at 20 MHz the CPU bandwidth required for touch decoding should be less than 15%. Main Points: SCU frees up CPU 100% during scanning Less than 15% CPU bandwidth is used up for post processing 30

SCU (Sensor Control Unit) SCU performs: Sequencing and timing of the charge/discharge Key scanning High-frequency filtering Interrupt Generation Data Transfers DTC or DMA SCU SCU Features 18 channel sense capability Single, scan, or selective scan modes Additional noise filtering S/W or H/W scan kickoff 31 31 Renesas has integrated this hardware function into the MCU in a hardware peripheral block known as the sensor control unit (SCU). With the integration of the sensor control unit (SCU) on the 33t, we can perform this charge and discharge of the sensor precisely and without burdening the MCU with the measurement task of the waveform. The SCU also integrates other H/W features to assist in the sampling of the touch waveform: Key scanning High-frequency filtering Interrupt Generation Automated Transfer of raw data via DTC or DMA The SCU Features are: 18 channel sense capability Single, scan, or selective scan modes Integrated H/W Filtering S/W or H/W scan kickoff 31

SCU Scan Sequence Complete scan example using Ch 0 to Ch 2 SCU Data Transfer to RAM Buffer SCSTRT (Start bit) User Code running SCU Operating Ch 0 Measure SCU DTC Ch 0 User Code running SCU Operating Ch 1 Measure SCU DTC Ch 1 User Code running SCU Operating Ch 2 Measure SCU DTC Ch 2 SCU Interrupt Touch SW Processing Scan is started by program Note: Time for operations not to scale 32 32 This diagram shows the relationship of the MCU operating condition when a scan sequence is performed. In this case we are showing the scan trigger being implemented in SW (program control). Once the start bit for the SCU is set by the program the SCU begins measuring from the first channel. Once this measurement is complete the values for that channel are transferred using DTC to RAM. The SCU then performs measurements on the next channel, transfers the data,etc until the last data is transferred to RAM. The SCU interrupt occurs after the last value is transferred to RAM. The API firmware will then process the data to determine if a touch has occurred on any channel 32

SCU Single Channel Operation SCU can scan single touch channels Trigger interrupt on complete start Measure Ch 2 SCU Interrupt* 33 33 The scan measurement options are shown in this slide. The simplest operation is a single channel conversion. The enable bit for the channel to be measured is enabled and when the scan is started that channel will be converted. 33

SCU Scan Operation SCU can scan multiple touch channels Scan ascending or descending order SFR values set range of scan Trigger interrupt on complete Ascending start Measure Ch 0 Measure Ch 1 Measure Ch 2 Descending start Measure Ch 2 Measure Ch 1 Measure Ch 0 SCU Interrupt* SCU Interrupt* 34 34 Multiple channels can be scanned, or converted, for each start trigger. The channels can be scanned in ascending or descending order. Ascending order will always start at Ch 0 and then scans to the Max Channel which is set in an SFR. Any channel that lies within this sequence will be tested. However, if the enable bit for one of these channels is not set the CHxA input will be fixed low, so when it is tested it will immediately complete. The data for that channel will actually be measured and stored into RAM but the higher level SW (API) will ignore that data since it knows that channel is not valid. An interrupt is generated after all channels are converted 34

SCU Selective Scan Operation Selective channel scan capable All channels still scanned Channels selectively enabled Trigger interrupt on complete start Measure Ch 0 Measure Ch 1 Measure Ch 2 Measure Ch 3 Measure Ch 4 - These channels are tested but the analog SW of these channels is OFF - measurement data is still transferred to RAM but this data is invalid SCU Interrupt* 35 35 Selective channels can also be scanned with individual enable/disable for each channel. If the enable bit for one of these channels is not set the zero d out, so when it is tested it will immediately complete. The data for that channel will actually be measured and stored into RAM but the higher level SW (API) will ignore that data since it knows that channel is not valid. An interrupt is generated after all channels are converted 35

SCU Hardware Noise Filtering Multiple Pre -Measurement Points SCU Generates each scan User selectable in software API 2 Modes 1 st threshold crossing 7 th consecutive crossing Helps with hardware noise rejection 36 36 The SCU transfers the two values for a channel conversion to a RAM buffer which is set up in memory. These two sets of data, denoted as A data and D data in the APU represent the separate H/W filtering built into the SCU to reduce high-frequency noise. As you can see in the graph, the A pattern and the D pattern are both depicted here for some clarity on when they are sampled. The A data represents when the 1 st threshold crossing occurs, specifically at the 100 value. The D data represents when the 7 th threshold crossing occurs. The counter m counts down from the 1 st crossing of the threshold until it counts out, then the D sample is taken. In this case, both equal 100 counts (as denoted by n in the chart) but this can be different depending on the speed of the discharge. It s important to note that both the A and D data are taken at all times and the user can choose between which data to use. 36

SCU Hardware Noise Filtering Multiple Measurement Types Random sample point(s) Software Selectable 16 sequential points Moves Count sample point within window Helps with noise rejection 37 37 This slide shows another hardware noise filtering feature built into the SCU. This measurement randomizes the sample point for the count within a window that is user defined in SFR registers. The randomizer sequences thru the SFR registers moving the sample point accordingly. 37

SCU Hardware Noise Filtering Multiple Measurement Types Majority vote Selectable majority 7 types Records Count after majority reached 38 38 This noise filter is a majority vote type filter. In the SCU an SFR can be selected to have a number of difference majority votes that the count has (or has not) crossed the threshold value. Once the vote has passed the count value is recorded. 38

SCU Hardware Noise Filtering Delay Timing Measurement Uses Random Pattern ~5nS Variation/sample Selectable random pattern 39 39 Another noise filter built into the SCU is a delayed timing pattern that can be selected to have a specific variation on the sampling. This pattern is random and as shown in the above graph, delays the sample point of the count value vs. the threshold. Each variation in the SFR register can modify the sample point ~ 5nS to help alleviate noise in the count value. 39

SCU Data Storage Primary and secondary count data is transferred by DTC to RAM Buffer Example Scan channel 0-2 in ascending order SCU Destination Register = 0C00h Start address of buffer is set in SCU Destination Register Dedicated RAM start Measure Ch 0 Measure Ch 1 Measure Ch 2 0C00h 0C01h 0C02h 0C03h 0C04h 0C05h 0C06h 0C07h 0C08h 0C09h 0C0Ah 0C0Bh CH0 dataa CH0 datad CH1 dataa CH1 datad CH2 dataa CH2 datad SCU Interrupt 40 40 So where does this count data go? The SCU transfers the two values for a channel conversion to a RAM buffer which is set up in memory. These two sets of data represent the separate H/W filtering built into the SCU to reduce high-frequency noise. The start address of the RAM buffer is programmed into a SFR register of the SCU. Each channel requires 4 bytes of buffer space, which is the two 16 bit values previously discussed. It s important to remember that this RAM needs to be dedicated to the touch solution and SCU. 40

SCU Data Storage (Selective Scan) Primary and secondary count data is transferred by DTC to RAM Buffer Example Scan channel 0-4 in ascending order Skip channel 1 and 3 SCU Destination Register = 0C00h Start address of buffer is set in SCU Destination Register Data is transferred even for disabled channels, higher level software should ignore start Measure Ch 0 Measure Ch 1 Measure Ch 2 Measure Ch 3 Measure Ch 4 SCU Interrupt* 0C00h 0C01h 0C02h 0C03h 0C04h 0C05h 0C06h 0C07h 0C08h 0C09h 0C0Ah 0C0Bh 0C0Ch 0C0Dh 0C0Eh 0C0Fh 0C10h 0C11h 0C12h 0C13h CH0 dataa CH0 datad CH1 dataa CH1 datad CH2 dataa CH2 datad CH3 dataa CH3 datad CH4 dataa CH4 datad 41 41 In a selective scan mode, the RAM buffer will contain data for all channels from the start channel to max channel even if the enable bit for a channel is not set. To simplify the operation and easy pointer access into the buffer, disabled channels are converted and data values are placed in the buffer though the upper level software will ignore them. 41

SCU Low Power Operation Core can be in Wait mode SCU trigger from Timer for sampling interval Power numbers TBD Once scan is completed DMA (not DTC) transfers data to RAM Utilizes a special SDMA block DMA interrupt wakes MCU on transfer complete Touch determination made No touch MCU back to sleep Touch - MCU services button 42 42 Another advantage of the SCU is it allows lower power operation of the touch system. The MCU core can be placed into wait mode to reduce power and the SCU unit can still perform scan operations. The SCU DMA will transfer the touch values to RAM then generate an interrupt which wakes the MCU and allows the touch values to be evaluated 42

Low-power Example Example using Timer as Trigger Wait mode Wait mode Power Consumption normal process SCU not operating SCU touch detection Touch Data processing SCU not operating SCU touch detection Touch Data processing Timer trigger Enable SCU (via S/W) Start trigger (internal) SCU DMA transfers touch data to RAM Buffer so MCU does not wake up until DMA Interrupt occurs 43 43 This diagram shows a low power sequence conversion of the touch channels. In this case the Timer RC trigger is used to allow periodic sampling of the touch sensors without MCU control. The MCU enables the SCU by setting the Start bit, however, in this case the condition to start sensing is set for Timer RC underflow so this condition must also be met. The MCU then goes to Wait Mode. At this point the power consumption is very low since the core and SCU are both off. When Timer RC underflows the SCU begins a sensor scan, power consumption at that point increases since the SCU is operation. Once the scan is complete the MCU will wake up and perform processing of the touch data, if there is no touch registered the MCU will go back to Wait mode. 43

Renesas Touch Solution 44 44 44

Renesas Touch Software Four Distinct Layers Renesas API covers: SCU Interface Sensor API Matrix Decode Sample code available Wheel Slider Switch Types Auto Calibration 45 45 In the development of Renesas touch software, we have delineated a typical touch application into 4 separate areas to better understand where certain S/W components fit into the solution. These are: Application layer Functional Implementation layer Sensor API layer Hardware interface layer The Renesas API covers the lowest two of these layers to help the user get off the ground with the SCU settings and basic functionality. Also the API integrates matrix switch decode as well since that low-level detection is tightly connected to basic touch detection. Sample code is also available for higher level functions such as: Wheels Sliders Switch types Auto-calibration routines 45

Renesas Touch API Small ~2.2k ROM 700 Bytes RAM Efficient < 15% CPU B/W Easy to Use API doc available Only 5 source files Source Code Free 46 46 The Renesas API has the following features: Small ~2.2k ROM 700 Bytes RAM Efficient < 15% CPU B/W Easy to Use API doc available Only 5 source files Source Code Free 46

Touch API Features Integrated Averaging Reduced supply effects Environmental issues Low frequency noise rejection 4x sample rate on low-level SCU data Continual processing Additional Filtering FIR (4-tap) 47 47 The Renesas API has the following features: Small ~2.2k ROM 700 Bytes RAM Efficient < 15% CPU B/W Easy to Use API doc available Only 5 source files Source Code Free 47

Touch API Features Drift Compensation Monitors continuously Reduces environmental effects Suspended if touched 48 48 The Renesas API has the following features: Small ~2.2k ROM 700 Bytes RAM Efficient < 15% CPU B/W Easy to Use API doc available Only 5 source files Source Code Free 48

Workbench Tuning Tool Several Tools in One Parameter Setup Status Monitoring Teaching Tool Circuit Tuning Wizard Multiple Connection Methods Hew Target Server (HTS) Via E8a Serial No Software Modification needed Snoops API touch variables No overhead when not connected 49 49 Renesas also includes a testing and tuning tool known as Workbench that is used in conjunction with the API to provide the user a straightforward method to evaluate and develop touch solutions. The API contains many features such as: Parameter Setup Status Monitoring Teaching Tool Circuit Tuning Wizard Also multiple connection methods are available for connecting Workbench to the embedded target. These are: Hew Target Server (HTS) Via E8a Serial Also it s important to note that no SW modification to the API is needed to use the Workbench tool. Workbench simply snoops the API touch variables and there is no API overhead when the tool is not connected. 49

Workbench Tuning Tool 50 50 Renesas also includes a testing and tuning tool known as Workbench that is used in conjunction with the API to provide the user a straightforward method to evaluate and develop touch solutions. The API contains many features such as: Parameter Setup Status Monitoring Teaching Tool Circuit Tuning Wizard Also multiple connection methods are available for connecting Workbench to the embedded target. These are: Hew Target Server (HTS) Via E8a Serial Also it s important to note that no SW modification to the API is needed to use the Workbench tool. Workbench simply snoops the API touch variables and there is no API overhead when the tool is not connected. 50

Workbench Tuning Tool 51 51 Renesas also includes a testing and tuning tool known as Workbench that is used in conjunction with the API to provide the user a straightforward method to evaluate and develop touch solutions. The API contains many features such as: Parameter Setup Status Monitoring Teaching Tool Circuit Tuning Wizard Also multiple connection methods are available for connecting Workbench to the embedded target. These are: Hew Target Server (HTS) Via E8a Serial Also it s important to note that no SW modification to the API is needed to use the Workbench tool. Workbench simply snoops the API touch variables and there is no API overhead when the tool is not connected. 51

Touch Application Notes Application notes Hardware Design Power Supplies Layout Noise Tech Briefs Humidity Temperature Design Guides Touch Benchmarks 52 52 The Renesas API has the following features: Small ~2.2k ROM 700 Bytes RAM Efficient < 15% CPU B/W Easy to Use API doc available Only 5 source files Source Code Free 52

Capacitive Touch Lab Hardware Renesas Demo Kit for R8C/33T Full featured development platform Includes E8a debugger HEW IDE environment and trial compiler Touch software source included Workbench tuning tool included Renesas Demo Kit for R8C/33T Processor Key Features: R8C 16-bit CPU core 20 MHz Operation Touch detector (SCU): 18-input (shared with I/O ports) Timers, Serial IO, ADC, others 53 53 Renesas Demo Kit for R8C/33T Full featured development platform Includes E8a debugger HEW IDE environment and trial compiler Touch software source included Workbench tuning tool included Processor Key Features: R8C 16-bit CPU core 20 MHz Operation Touch detector (SCU): 18-input (shared with I/O ports) Timers, Serial IO, ADC, others 53

Lab Overview 54 54 54

Lab Overview Takeaways Overview of the Touch API Explore a simple touch project Connect to tuning tools Experiment with touch settings Additional benefits HEW environment development tools debugger system 55 55 Takeaways Overview of the Touch API Explore a simple touch project Connect to tuning tools Experiment with touch settings Additional benefits HEW environment development tools debugger system Renesas Touch Demo Platform Overview 55

Start the Lab Keep your dice turned to the section of the lab you are on. (Instructions are provided in the lab handout) Please refer to the Lab Handout and let s get started! 56 56 56

Questions? 57 57 57

Lab Questions Question If Sensor_SetSCU_Scan(0x0000F) is enabled, what channels are active when the a scan is kicked off? Answer: Channels 0-3 are the only channels active. Question If Nref is 398, Cthr is 52, and Ncount, when touched dips to 347, has a touch event occurred? Answer: No, Ncount would need to dip below 346 for a touch to be registered Question What is the size of the variable used to return the binary touch data to the calling function? Answer: 32-bit variable 58 Question What is the connection method to Workbench using the E8a? Answer: HEW Target Server 58 Look in the custom animation! By putting a picture on top, we will print this page as a handout and it will not contain the answer! The picture is the page being presented, but only the question is showing. I used Snag-It to capture the picture. The picture goes away with previous! (using custom animation) 58

Thank You! 59 59

Renesas Electronics America Inc. 60