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