Download presentation
Presentation is loading. Please wait.
Published byJuliana Leonard Modified over 9 years ago
1
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 434L: Incorporating a Capacitive Touch Interface into Your Design Jim Page Senior Applications Engineer 12 & 13 October 2010 Version: 1.1
2
2 © 2010 Renesas Electronics America Inc. All rights reserved. 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 Jim Page
3
3 © 2010 Renesas Electronics America Inc. All rights reserved. Renesas Technology and Solution Portfolio Microcontrollers & Microprocessors #1 Market share worldwide * Analog and Power Devices #1 Market share in low-voltage MOSFET** Solutions for Innovation ASIC, ASSP & Memory Advanced and proven technologies * 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
4 © 2010 Renesas Electronics America Inc. All rights reserved. 4 Renesas Technology and Solution Portfolio Microcontrollers & Microprocessors #1 Market share worldwide * Analog and Power Devices #1 Market share in low-voltage MOSFET** ASIC, ASSP & Memory Advanced and proven technologies * 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). Solutions for Innovation
5
5 © 2010 Renesas Electronics America Inc. All rights reserved. 5 5 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 Up to 500 DMIPS, 150 & 90nm process 600uA/MHz, 1.5 uA standby Medical, Automotive & Industrial Legacy Cores Next-generation migration to RX High Performance CPU, FPU, DSC 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 Up to 165 DMIPS, 90nm process 500uA/MHz, 2.5 uA standby Ethernet, CAN, USB, Motor Control, TFT Display High Performance CPU, Low Power Ultra Low Power General Purpose
6
6 © 2010 Renesas Electronics America Inc. All rights reserved. 6 6 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 Up to 500 DMIPS, 150 & 90nm process 600uA/MHz, 1.5 uA standby Medical, Automotive & Industrial Legacy Cores Next-generation migration to RX High Performance CPU, FPU, DSC 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 Up to 165 DMIPS, 90nm process 500uA/MHz, 2.5 uA standby Ethernet, CAN, USB, Motor Control, TFT Display High Performance CPU, Low Power Ultra Low Power General Purpose R8C Capacitive Touch Solution
7
7 © 2010 Renesas Electronics America Inc. All rights reserved. Switches… 7
8
8 © 2010 Renesas Electronics America Inc. All rights reserved. Switches… 8
9
9 © 2010 Renesas Electronics America Inc. All rights reserved. Switches… 9
10
10 © 2010 Renesas Electronics America Inc. All rights reserved. Renesas Capacitive Touch Innovation Renesas provides you a complete hardware, software, and tool solution for implementing capacitive touch technology into your embedded designs. 10
11
11 © 2010 Renesas Electronics America Inc. All rights reserved. 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
12
12 © 2010 Renesas Electronics America Inc. All rights reserved. Touch Basics 12
13
13 © 2010 Renesas Electronics America Inc. All rights reserved. Self Capacitance * Power Consumption: Low Emissions: Low Immunity: Medium 13 © 2010 Renesas Electronics America Inc. All rights reserved. Mutual Capacitance * Power Consumption: Medium/High Emissions: Medium/High Immunity: Medium/High * Attributes may vary depending on implementation Capacitive Touch Detection Methods
14
14 © 2010 Renesas Electronics America Inc. All rights reserved. Touch Basics Simple Touch System Sensor Electrode pad Connecting traces Capacitive Component Earth Enclosure PCB + Components Overlay 14
15
15 © 2010 Renesas Electronics America Inc. All rights reserved. Touch Basics 15 ) Make it simple… Lump them together Create combined ‘cap’
16
16 © 2010 Renesas Electronics America Inc. All rights reserved. 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
17
17 © 2010 Renesas Electronics America Inc. All rights reserved. Touch Basics Simple RC Circuit 17 Charge Capacitor Charge/Discharge Resistor Comparison Capacitor
18
18 © 2010 Renesas Electronics America Inc. All rights reserved. Touch Basics 18 Add control components
19
19 © 2010 Renesas Electronics America Inc. All rights reserved. Touch Basics 19 Charge circuit…
20
20 © 2010 Renesas Electronics America Inc. All rights reserved. Touch Basics 20 Charging Completed…
21
21 © 2010 Renesas Electronics America Inc. All rights reserved. Touch Basics 21 Discharge Circuit…
22
22 © 2010 Renesas Electronics America Inc. All rights reserved. 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
23
23 © 2010 Renesas Electronics America Inc. All rights reserved. Touch Basics 23 ‘Object’ Introduction Adds Capacitance – Few pF Very Small mV of difference
24
24 © 2010 Renesas Electronics America Inc. All rights reserved. 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
25
25 © 2010 Renesas Electronics America Inc. All rights reserved. Touch…Analog to Digital 25 Sampling Create ‘counts’ vs. ‘threshold’
26
26 © 2010 Renesas Electronics America Inc. All rights reserved. Touch…Analog to Digital ‘Counts’ vs. Time 26
27
27 © 2010 Renesas Electronics America Inc. All rights reserved. Touch…Analog to Digital 27
28
28 © 2010 Renesas Electronics America Inc. All rights reserved. The Sensor Control Unit (SCU) 28
29
29 © 2010 Renesas Electronics America Inc. All rights reserved. Why Develop Hardware? 29 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?
30
30 © 2010 Renesas Electronics America Inc. All rights reserved. 30 © 2010 Renesas Electronics America Inc. All rights reserved. Software- based solution R8C/3xT Option A R8C/3xT Option B CPU used 100% in software solution CPU in R8C/3xT Fully stopped Or system functions Less than 15% CPU usage Scanning + Data Transfer System Functions CPU SCU CPU SCU Not Operating CPU Active (Touch Scanning) CPU Active (System Functions) CPU Active (Touch Post Processing) CPU CLK … Less than 15% of total CPU time (20MHz) Why Develop Hardware? (continued)
31
31 © 2010 Renesas Electronics America Inc. All rights reserved. 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 Features 18 channel sense capability Single, scan, or selective scan modes Additional noise filtering S/W or H/W scan kickoff 31 SCU
32
32 © 2010 Renesas Electronics America Inc. All rights reserved. SCU Scan Sequence 32 SCSTRT (Start bit) Complete scan example using Ch 0 to Ch 2 User Code running Ch 0 Measure SCU Operating SCU DTC Ch 0 Note: Time for operations not to scale Ch 1 Measure User Code running SCU DTC Ch 1 Ch 2 Measure User Code running SCU DTC Ch 2 SCU Interrupt Touch SW Processing Scan is started by program SCU Operating SCU Data Transfer to RAM Buffer
33
33 © 2010 Renesas Electronics America Inc. All rights reserved. SCU Single Channel Operation SCU can scan single touch channels Trigger interrupt on complete 33 start SCU Interrupt* Measure Ch 2
34
34 © 2010 Renesas Electronics America Inc. All rights reserved. SCU Scan Operation SCU can scan multiple touch channels Scan ascending or descending order SFR values set range of scan Trigger interrupt on complete 34 start SCU Interrupt* Measure Ch 2 Measure Ch 1 Measure Ch 0 start SCU Interrupt* Measure Ch 0 Measure Ch 1 Measure Ch 2 AscendingDescending
35
35 © 2010 Renesas Electronics America Inc. All rights reserved. SCU Selective Scan Operation Selective channel scan capable All channels still scanned Channels selectively enabled Trigger interrupt on complete 35 -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 start SCU Interrupt* Measure Ch 4 Measure Ch 2 Measure Ch 1 Measure Ch 0 Measure Ch 3
36
36 © 2010 Renesas Electronics America Inc. All rights reserved. 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
37
37 © 2010 Renesas Electronics America Inc. All rights reserved. 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
38
38 © 2010 Renesas Electronics America Inc. All rights reserved. SCU Hardware Noise Filtering Multiple Measurement Types Majority vote Selectable ‘majority’ – 7 types Records ‘Count’ after majority reached 38
39
39 © 2010 Renesas Electronics America Inc. All rights reserved. SCU Hardware Noise Filtering Delay Timing Measurement Uses Random Pattern – ~5nS Variation/sample Selectable random pattern 39
40
40 © 2010 Renesas Electronics America Inc. All rights reserved. SCU Data Storage Primary and secondary count data is transferred by DTC to RAM Buffer Start address of buffer is set in SCU Destination Register Dedicated RAM 40 0C00h 0C01h 0C02h 0C03h 0C04h 0C05h 0C06h 0C07h 0C08h 0C09h 0C0Ah 0C0Bh Example Scan channel 0-2 in ascending order SCU Destination Register = 0C00h CH0 dataA CH0 dataD CH1 dataA CH1 dataD CH2 dataA CH2 dataD start SCU Interrupt Measure Ch 2 Measure Ch 1 Measure Ch 0
41
41 © 2010 Renesas Electronics America Inc. All rights reserved. SCU Data Storage (Selective Scan) Primary and secondary count data is transferred by DTC to RAM Buffer Start address of buffer is set in SCU Destination Register Data is transferred even for disabled channels, higher level software should ignore 41 start SCU Interrupt* Measure Ch 4 Measure Ch 2 Measure Ch 1 Measure Ch 0 Measure Ch 3 0C00h 0C01h 0C02h 0C03h 0C04h 0C05h 0C06h 0C07h 0C08h 0C09h 0C0Ah 0C0Bh CH0 dataA CH0 dataD CH1 dataA CH1 dataD CH2 dataA CH2 dataD Example Scan channel 0-4 in ascending order Skip channel 1 and 3 SCU Destination Register = 0C00h 0C0Ch 0C0Dh 0C0Eh 0C0Fh 0C10h 0C11h 0C12h 0C13h CH3 dataA CH3 dataD CH4 dataA CH4 dataD
42
42 © 2010 Renesas Electronics America Inc. All rights reserved. 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
43
43 © 2010 Renesas Electronics America Inc. All rights reserved. Low-power Example 43 Example using Timer as Trigger Touch Data processing SCU touch detection normal process SCU not operating Wait mode Timer trigger Start trigger (internal) Enable SCU (via S/W) Touch Data processing SCU not operating Wait mode Power Consumption SCU touch detection SCU DMA transfers touch data to RAM Buffer so MCU does not wake up until DMA Interrupt occurs
44
44 © 2010 Renesas Electronics America Inc. All rights reserved. Renesas Touch Solution 44
45
45 © 2010 Renesas Electronics America Inc. All rights reserved. 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 © 2010 Renesas Electronics America Inc. All rights reserved.
46
46 © 2010 Renesas Electronics America Inc. All rights reserved. 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
47
47 © 2010 Renesas Electronics America Inc. All rights reserved. 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
48
48 © 2010 Renesas Electronics America Inc. All rights reserved. Touch API Features Drift Compensation Monitors continuously Reduces environmental effects Suspended if touched 48
49
49 © 2010 Renesas Electronics America Inc. All rights reserved. Workbench Tuning Tool 49 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
50
50 © 2010 Renesas Electronics America Inc. All rights reserved. Workbench Tuning Tool 50
51
51 © 2010 Renesas Electronics America Inc. All rights reserved. Workbench Tuning Tool 51
52
52 © 2010 Renesas Electronics America Inc. All rights reserved. Touch Application Notes Application notes Hardware Design Power Supplies Layout Noise Tech Briefs Humidity Temperature Design Guides Touch Benchmarks 52
53
53 © 2010 Renesas Electronics America Inc. All rights reserved. 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 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 Renesas Demo Kit for R8C/33T
54
54 © 2010 Renesas Electronics America Inc. All rights reserved. Lab Overview 54
55
55 © 2010 Renesas Electronics America Inc. All rights reserved. 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
56
56 © 2010 Renesas Electronics America Inc. All rights reserved. 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 © 2010 Renesas Electronics America Inc. All rights reserved.
57
57 © 2010 Renesas Electronics America Inc. All rights reserved. Questions? 57
58
58 © 2010 Renesas Electronics America Inc. All rights reserved. Lab Questions 58 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 Question What is the connection method to Workbench using the E8a? Answer: HEW Target Server
59
© 2010 Renesas Electronics America Inc. All rights reserved. 59 Thank You!
60
Renesas Electronics America Inc.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.