Any Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by
and subject to worldwide patent protection (United States and foreign), United States copyright laws and international treaty
provisions. Cypress hereby grants to licensee a personal, non-exclusive, non-transferable license to copy, use, modify, create
derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating custom software and or firmware in support of licensee product to be used only in conjunction with a Cypress integrated circuit as specified in the applicable agreement. Any reproduction, modification, transla tion, compilation, or representation of this Source
Code except as specified above is prohibited without the express written permission of Cypress.
Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. Cypress reserves the right to make cha nges without further notice to the materials described
herein. Cypress does not assume any liability arising out of the applica tion or use of any product or circuit described herein.
Cypress does not authorize its products for use as critical components in life-support systems whe re a malfunction or failure
may reasonably be expected to result in significant injury to the user. The inclusion of Cypress’ product in a life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all
charges.
Use may be limited by and subject to the applicable Cypress software license agreement.
PSoC Designer™, Programmable System-on-Chip™, and PSoC Express™ are trademarks and PSoC® is a registered
trademark of Cypress Semiconductor Corp. All other trademarks or registered trademarks referenced herein are property of
the respective corporations.
Flash Code Protection
Cypress products meet the specifications contained in their particular Cypress PSoC Data Sheets. Cypress believes that its
family of PSoC products is one of the most secure families of its kind on the market today, regardless of how they are used.
There may be methods, unknown to Cypress, that can breach the code protecti on features. Any of these methods, to our
knowledge, would be dishonest and possibly illegal. Neither Cypress nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the prod uct as "unbreakable."
Cypress is willing to work with the customer who is concerned about the inte grity of their code. Co de prot ection i s constantly
evolving. We at Cypress are committed to continuously improving the code protection features of our products.
■ PSoC Designer and PSoC Programmer Installation CD
■ CY3280-BK1 Universal CapSense Controller Kit CD
■ 1.5 mm and 3 mm Polycarbonate Overlays (with Adhesive for attachment to module board if
wanted)
Installing Software
To use the examples in this quick start:
■ Install PSoC Express Development Software
■ Install PSoC Designer Development Software
■ Review the Additional CY3280-BK1 Universal CapSense Controller CD Content
Install PSoC Express Development Software
1.1 Insert the PSoC Express Installation CD.
1.2 Install PSoC Express 3.
1.3 Install .NET Framework 2.0.
1.4 Install PSoC Programmer.
1.5 Install Express Pack 3 (found on the kit CD in the \Software folder).
Install PSoC Designer Development Software
1.6 Insert the PSoC Designer and PSoC Programmer Installation CD.
1.7 Browse to and launch PD44_B119x86.exe at \PSoC Programmer 2.3_PSoc Designer
4.4\psoc_designer_tm__v__4_4_13\.
1.8 Follow the installation instructions.
1.9 Install Service Pack 1 (found on the kit CD in the \Software folder).
1.10 A C compiler license is required to build PSoC Designer C language projects. Section 2.1 of the
C Language Compiler Users Guide.pdf found in Help Documentation explains how to enter
the license.
Additional CY3280-BK1 Universal CapSense Controller CD Content
■ Example projects for PSoC Express and PSoC Designer
■ Hardware schematics and gerber files
■ CY3240-I2USB software installer and documentation
CapSense Best Practices
The Universal CapSense Controller has been created using the best practices for CapSense lay out.
To enable universality and development of the kit and its projects, certain design elements have
been changed from what is recommended for final products. Below is a list of the design features in
the Universal CapSense Controller and what to change for final products.
Design FeatureReasonImpactRecommended Change
Sensing traces
routed through a
connector to sensors
Sensing traces
routed to other
schematic elements
Sensing traces
located on the top
layer
Several regulators
used, including a
variable regulator
Test point on CMOD Accessibility of charge/dis-
GND spacing is
generalized for
noise immunity and
sensitivity
Connection to shield
electrode is through
a jumper (module J2)
ESD protection circuitry is not included
UM Parameters set
to supplied overlay
thicknesses
Unused pins are not
routed directly to
GND
0-ohm Resistors
populated throughout
Buttons, sliders and LEDs
placed on the module board to
all for greater flexibility with custom modules for development
and subsequent releases.
Universality of the board
enabled by population/depopulation of 0-ohm resistors
Using vias to route traces to bottom of board and back to connector increases parasitic
capacitance.
Demonstration of CapSense at
several voltages.
charge waveforms
Universality of kit required middle-ground on many parameters
Flexibility of module boards for
both CSD and CSA control
boards
Development/evaluation platform without consistent overlay
is inherently vulnerable to ESD
events
Projects optimized for supplied
hardware
Pins brought out to connector
for subsequent modules or custom designs
Universality of the board
enabled by population/depopulation of 0-ohm resistors
Connectors increase the parasitic capacitance of the sensors,
effectively reducing their sensitivity. Connectors also create
another path for noise to enter
the system.
Solder pads of 0-ohm resistors
increase parasitic capacitance.
Possible noise sensitivity to
stimulus on top side of board.
Finger presses on routing of
control board can lead to sensor
activation.
Global and User Module parameters may need to be verified
with changing power supply.
A test point increases noise sensitivity by acting as an antenna.
Design is not optimized for highnoise or very thick overlays
Higher resistance paths can
impair performance of shield
electrode in CSD projects
Direct or air-separated ESD
testing may impair operation or
damage circuitry. +/-2kV limit on
PSoC pins (see datasheet).
Sensitivity may not be high
enough for very thicker overlays
Possible noise pathTie unused sensing traces
Solder pads of 0-ohm resistors
increase parasitic capacitance
Sensors and control circuitry
should be located on the same
printed circuit board. Lower parasitic capacitance by reducing
trace lengths.
Route traces directly to sensing
elements. Use as few 0-ohm
resistors as possible
Route sensing traces on nonuser side of printed circuit
board. Route sensing traces as
far from noise sources as possible.
Supply one regulated voltage to
PSoC.
Solder-pad test points for leads
offer better noise immunity if test
points are required.
Increase spacing for thicker
overlays and better sensitivity.
Decrease spacing for greater
noise immunity
Dedicated trace for shield electrode. Remove jumpers wherever possible
Include an overlay and ESD protection circuitry
Thicker overlays may require
verification of parameters to
ensure proper operation
directly to ground
Route traces directly to sensing
elements. Use as few 0-ohm
resistors as possible
The examples in this Quick Start are for the CY3280-20x34 and CY3280-SLM Linear Slider Module
boards only.
The CY3280-20x34 board is preprogrammed with demonstration firmware. When powered by a
PSoC MiniProg, a CY3240-I2USB Bridge, or an optional external power supply, the LEDs light up
when a finger touches one of the buttons or the slider.
These instructions assume your board has not been reprogrammed from the factory settings. If it
has, and you would like to follow along with this demonstration, follow the instructions in the Resetting the Board to the Original Factory Programming section on page 5, and then start this example
with the Power the Board section below.
Power the Board
2.1 Connect your computer to the CapSense test board ISSP Connector (J3) using the PSoC
MiniProg and a USB cable. If this is your first time using the MiniProg, you will need to install the
driver using these steps before proceeding:
a. When the Found New Hardware Wizard opens, select the Install the software automati-
cally (Recommended) option and click Next.
b. A warning message may tell you the software you are trying to install has not passed Win-
dows Logo testing. Click Continue Anyway each time it appears.
c. When the installation is complete, click Finish.
2.2 Open PSoC Programmer by going to the Windows Start menu and selecting All Programs
Cypress MicroSystems PSoC Programming PSoC Programmer.
2.3 From the Port menu, select MiniProg1/<Identification Code>.
2.4 Click Toggle Device Power . The D1 LED on the CY3280-20x34 board lights
green.
Test the Board
2.5 Touch the slider on the board with your finger. An LED will light up representing where your finger is on the slider. The LED state changes as you move your finger across the slider
2.6 Touch one or more buttons with your finger. The LEDs light up corresponding to the buttons
being pressed.
Resetting the Board to the Original Factory Programming
Follow these steps if you wish to reset the board to the original factory installed programming:
2.7 Place shunts on pins 2 and 3 of J1 and pins 1 and 2 of J4.
2.8 The example projects are available on the CD and from the Cypress web site. On
www.cypress.com, search for CY3280-BK1.
2.9 To reset the board to the factory conditions, connect your computer to the CY328020x34 board ISSP Connector (J3) using the PSoC MiniProg and a USB cable.
2.10 Open PSoC Programmer by going to the Windows Start menu All Programs
Cypress MicroSystems PSoC Programming PSoC Programmer
2.11 Click File Load, navigate to, and open the CY3280_20x34_slm.hex file on the CD at:
2.13 From the Device menu, select CY8C20434-12LFXC.
2.14 Click Program. “Programming Succeeded...” appears in the Actions pane when programming
is complete.
Note: The CY3280_20x34_slm example project is a PSoC Designer project, and will not open with
PSoC Express. PSoC Programmer uses .hex files generated by both applications.
This project walks you through the steps of creating a PSoC Express project fr om scratch. At the end
of the project, you will be able to touch a button on the board and see the corresponding LED light
up.
Start a New Project
3.1 Open PSoC Express.
3.2 Select File New Project.
3.3 Name the project MyExpressProject.
3.4 If needed, click Browse to save the project in a different location.
3.5 Click OK.
Add the First CSA Button Driver to Your Design
3.6 Ensure the Driver Catalog pane is visible by selecting ViewDriver Catalog.
3.7 Each driver and valuator has certain properties associated with it. For the purposes of this
example, ensure View
Use Add Driver Dialog is checked.
3.8 In the Driver Catalog pane, go to Inputs CapSense CapSense - CSA, right-click on Button - CSA, and select Add to Design. The Add Input Driver window will open.
3.9 In the Add Input Driver window, name the driver Button1.
3.10 Click OK to accept the default settings. Another Add Input Driver window will open automatically.
3.11 Name this driver CapSenseProperties.
3.12 In the Properties pane, set ExternalCap to Enabled.
3.13 Click OK.
Add a Second CSA Button Driver to Your Design
3.14 Repeat Step 3.8 to add a second CSA Button to your design.
3.15 Name the driver Button2.
3.16 Click OK.
Add the First LED Value Driver to Your Design
3.17 In the Driver Catalog pane, go to Outputs Display LED Single Color, and add an On/
Off driver to your design. The Add Output Driver window will open.
3.18 In the Add Output Driver window, name the driver LED1.
3.19 In the Properties pane, set Current Mode to Sinking.
3.20 Click OK.
Add the Second LED Value Driver to Your Design
3.21 In the Driver Catalog pane, go to Outputs Display LED Single Color, and add another
On/Off driver to your design. The Add Output Driver window will open.
3.22 In the Add Output Driver window, name the driver LED2.
3.23 In the Properties pane, set Current Mode to Sinking.
3.25 You now have five drivers on your design desktop: Button1, Button2, LED1, LED2, and
CapSenseProperties. Right-click the LED1 dr ive r and select Transfer Function.
Note: If your driver icons are stacked on top of each other, simply use your mouse to click and drag
each driver to a new location until all five drivers are clearly visible. You may also click your mouse
button while holding the [Ctrl] or [Ctrl] + [Shift] keys to zoom in and out respectively.
3.26 In the Select Transfer Function window, select TableLookup and click OK.
3.27 In the Select Input(s) window, select Button1_Status.
Create a PSoC Express CapSense Project
3.28 Click Next.
3.29 Set the Table Lookup to have the LED be off when its corresponding button is in an of f state,
and on when the button is in the on state.
3.30 Click OK.
3.31 Repeat steps 3.25 to 3.30 for LED2, making sure to select Button2_Status for the Transfer
Function.
3.33 In the PSoC Device Configuration Selection window, select the CY8C20434, 32-Pin QFN part
in the Available Device Configurations pane.
Note: The CY3280-20x34 Universal CapSense Controller includes a special on-chip debugger
(OCD) part, CY8C20000, which is a 48-pin part that is not normally used for production. The
corresponding production part is a CY8C20X34, and comes in 24 and 32 pin packag es. For
instance, a CY8C20434 is a 32 pin QFN that has many of the same pins as the CY8C20000,
but is a production part without the OCD function.
3.34 Ensure the Assign pins automatically check box is NOT selected.
3.35 Click Next.
Assign Drivers to Pins
3.36 In the User Pin Assignment window, click Unassign All Pins. All drivers move to the Unassigned Drivers list.
3.37 To assign drivers to pins, drag and drop drivers from the Unassigned Drivers list onto a pin.
Assign the CapSenseProperties_ExternalCap driver to port P0[3].
(previously assigned in Step 3.27)
LED1P2[5]
LED2P2[7]
3>@3RUWBB
3>@&DS6HQVH3URSHUWLHV
966
&<&/);&
/('
/('
3>@3RUWBB
3>@
3>@
3>@3RUWBB
3>@3RUWBB
3>@3RUWBB
3>@3RUWBB
3>@3RUWBB
3>@3RUWBB
4)1
P0[3]
3>@3RUWBB
9''
3>@3RUWBB
3>@3RUWBB
3>@3RUWBB
3>@3RUWBB
3>@3RUWBB
3>@3RUWBB
3>@3RUWBB
3>@3RUWBB
3>@3RUWBB
;5(6
3>@3RUWBB
3>@
3>@3RUWBB
966
3>@3RUWBB
3>@3RUWBB
3>@3RUWBB
3>@
%XWWRQB&6$
%XWWRQB&6$
3.39 Click Next. PSoC Express builds your project (this may take a few minutes).
Program the CY3280-20x34 UCC Board
3.40 Connect your computer to the CapSense test board ISSP Connector (J3) using the
PSoC MiniProg and a USB cable.
3.41 If this is your first time using the MiniProg, you will need to install the driver before
proceeding. Follow the instructions in the Power the Board section on page 7.
3.42 In PSoC Express, select Program PSoC Programmer. The PSoC Programmer application
opens.
3.43 From the Port menu, select MiniProg1/<Identification Code>.
3.44 Click Program. “Programming Succeeded...” appears in the Actions pane when programming is complete.
Test the Board
3.45 Click Toggle Device Power .
3.46 Touch buttons P1[6] and P1[3] on the board with your finger. The corresponding LED lights up.
3.47 When you are done experimenting, clic k Toggle Device Power , and close
PSoC Programmer.
3.48 Return to PSoC Express and select File Save Application.
What’s Next?
You have now completed the PSoC Express CapSense project. The next example walks you
through adjusting the settings so the slider is not as sensitive, a process known as tuning.
Note: A CY3240-I2USB Bridge is needed for CapSense tuning. If you do no t have a CY32 40-I2USB
Bridge board, purchase one online by goin g to http://www.cypress.com/design/DK10063, and clicking Buy Online.
The goal of tuning a capacitive sensing application is to adjust the sensitivity of the buttons or slider
so that they accurately detect finger presses. This involves determining which raw counts coming
from the sensor are actual finger presses, or if it is some other stimuli that changes the raw count.
Detailed tuning information is available in the CapSense Guide. In PSoC Express, select Help
Documentation, and select CapSense Guide.
Open Your PSoC Express Project
4.1 In PSoC Express, if the project from the previous example is closed, select MyExpressProject
in the Recent Project pane (or click browse and open the project).
4.2 If you are not in the Design view, click Design .
Add an I2C Slave Driver to Your Design
4.3 In the Driver Catalog pane, go to Interfaces Communication I2C, and add a Slave driver
to your design.
4.4 In the Add Interface window, name the driver I2CSlave and click OK.
4.9 In the User Pin Assignment window, click Unassign All Pins. All drivers move to the Unassigned Drivers list.
4.10To assign drivers to pins, drag and drop drivers from the Unassigned Drivers list onto a pin.
Assign the CapSenseProperties_ExternalCap driver to port P0[3].
Assign the rest of the drivers according to the following table.
(previously assigned in Step 4.10)
I2CSlave I2CSCLPinP1[1]
I2CSlave I2CSDAPin (automatically
assigned when the SCL pin is assigned)
LED1P2[5]
LED2P2[7]
P0[3]
P1[0]
4.11 Click Next. PSoC Express builds your project (this may take a few minutes).
Program the CY3280-20x34 UCC Board
4.12 Connect your computer to the CapSense test board ISSP Connector (J3) using the PSoC
MiniProg and a USB cable.
4.13 Select ProgramProgrammer. When PSoC Programmer opens, click Program.
When programming has successfully completed, close PSoC Programmer and return to PSoC
Express.
Tune Button1
4.14 Click the Monitor button .
4.15 Connect your computer to the CapSense test board ISSP Connector (J3) using the USBI2C bridge and a USB cable.
4.16 From the Power Selection menu, se lec t 5V Supplied.
4.17 Click the Start button.
4.18 Right-click the Button1 driver and select Show Tuner to open the CSA Button Tuner Window.
4.19Touch Button1 with your finger. Y ou can easily see the button is too sensitive because the sensor easily reports a full-finger contact.
4.20Increase the Finger Threshold to 250 and the IDAC setting to 250. Changing the IDAC setting is
inversely related to the sensitivity of the button. Therefore, increasing the value decreases the
sensitivity. Any Raw Count below the Finger Threshold does not register as a hit.
4.21 Click Apply to Board to write the changed parameter to Flash on the device.
4.22 Touch the button with your finger. The button is now less sensitive. When you're finished experimenting, close the CSA Button Tuner window and then click Stop. Monitoring a design consumes a lot of processor cycles on your PC.
Congratulations! You have successfully completed this example.To experiment with additional Universal CapSense designs, go to the \Firmware folder on the kit CD.
This project is a brief introduction to PSoC Designer. It is recommended that you complete the PSoC
Designer training offered by Cypress. At the end of the project, you will be able to touch button P2[3]
on the CY3280-SLM board and see the corresponding LED light up. A C compiler license is required
to build PSoC Designer C language projects. Section 2.1 of the C Language Compiler Users
Guide.pdf found in Help Documentation explains how to enter the license.
Start a New Project
5.1 Open PSoC Designer.
5.2 Click Start New Project button .
5.3 Name the project MyDesignerProject.
5.4 If needed, click Browse to save the project in a different location.
5.5 Click Next.
5.6 A window may pop up notifying of any directory creations. Click Yes.
5.11 If it is not already selected, click the Device Editor button .
5.12 Select Config Selection to see the user module selection screen.
5.13 Under Cap Sensors, right-click the CSA user module on the left of the screen.
5.14 Click Select.
5.15 Under Misc Digital, right-click the LED user module on the left of the screen.
5.16 Click Select.
5.17 Under Digital Comm, right-click the EzI2Cs user module on the left of the screen.
5.18 Click Select.
5.19 All three selected user modules should show up in the Selected User Modules window.
5.20 Select Config Interconnect to see the interconnect view.
5.21 To place the CSA and EzI2Cs user modules, right-click each user module and select Place.
Note that the LED user module cannot be placed by the user.
5.41 Connect your computer to the CapSense test board ISSP Connector (J3) using the PSoC MiniProg and a USB cable. If this is your first time using the MiniProg, you will need to install the
driver before proceeding. Follow the instructions in the Power the Board section on page 4 .
5.42 In PSoC Designer, select Program Program Part.The PSoC Programmer application
opens.
5.43 From the Port menu, select MiniProg1/<Identification Code>.
5.44 Click Program. "Programming Succeeded..." appears in the Actions pane when programming
is complete.
Create a PSoC Designer CapSense Project
Test the Board
5.45 Click Toggle Device Power.
5.46 Touch the sensor P2[3] on the board with your finger. The LED P1[2] will light up.
5.47 When you are done, click Toggle Device Power, and close PSoC Programmer.
5.48 Return to PSoC Designer and select File Save Project.
What's Next?
You have now completed the PSoC Designer CapSense project. There is a complete project that
implements buttons and a slider available on the CD. To use these projects, the project folders need
to be copied from the CD to a directory on a PC that h as PSoC Desig ne r installed. After copying the
files, ensure that the parent folder attributes are not Read-only by following these steps:
5.49 Right-click the parent project folder.
5.50 Select Properties.
5.51 Ensure that the Read-only attribute is not checked.
For all PSoC device data sheets and detailed appl ication notes, many with complete sta rter projects,
visit www.cypress.com/designresources. In the Products column, select “PSoC Mixed-Signal Controllers” and in the Resource Type column, select either “Application Notes” or “Datasheets.”
PSoC Device Selector Guide
In the PSoC Application Notes section, search for AN2209—The Device Selection Guide for PSoC.
It is a useful tool for determining exactly which PSoC device you should use for a specific design
project.
PSoC Development Tools Selector Guide
In the PSoC Application Notes section, search for AN2402, The PSoC Development Tools Selector
Guide. This is a complete catalog and description of all the develop m ent too ls th at su pp o rt PSoC
devices and when to use them in your design cycle—from concept to production.
PSoC On-Demand Training
Visit www.cypress.com/psoctraining to engage in on-de mand self-p aced PSoC product and devel opment software training. Learn to design PSoC like the pros, at the introductory, intermediate, and
advanced knowledge levels!
PSoC On-Site Training
Email training@cypress.com to enquire about PSoC in-person training seminars at a location near
you. Learn design basics, tips, and tricks from the pros to become a PSoC design expert!
Online Technical Support
For knowledge base articles, customer forums, and online application support, visit
A wealth of information about PSoC Express and CapSense is available on the Cypress.com web
site, and more is frequently added. The following list is just a sample of what is available.
CapSense DataSheets
■ CY8C20434 Mixed Signal Array
■ CY8C20334 Mixed Signal Array
■ CY8C20234 Mixed Signal Array
CapSense Application Notes
■ AN2292, Layout Guidelines for PSoC™ CapSense
■ AN2318, EMC Design Considerations for PSoC CapSense Applications
■ AN2355, Calibrating CapSense with the CSR User Module
■ AN2360, Power and Sleep Considerations
■ AN2393, Migrating from CSR to CSA
■ AN2394, CapSense Best Practices
■ AN2397, CapSense Data Viewing Tool
■ AN2398, Waterproof Capacitive Sensing
■ AN2403, Signal-to-Noise Ratio Requirement for CapSense Applications
■ AN2408, Migrating from CSR to CSD
■ AN14459, CapSense Device and Method Selection Guide
CapSense Technical Articles
■ TA1186, Designer's Guide to Rapid Prototyping of Capacitive Sensors on any Surface
■ TA1179, Controls & Sensors Touch Sensors Spread Out
■ TA1168, White Paper Cypress’s CapSense Successive Approximation Algorithm