Cypress PSoC 5 First Touch™ Starter Kit
Mfg Part Number: CY8CKIT-014
Price: $49 USD
Available at www.cypress.com/go/cy8ckit-014
will open the collection of pre-built components. Clicking
one of the components in the catalog brings up a preview
of the schematic symbol and a link to the component
datasheet in the lower left-hand corner of the window. You
can also right-click on a component to access the
datasheet, and locate an example project showing the
component being used. Components are added to a design
by dragging them from the Component Catalog on to
schematic. Once in the schematic, you can double-click
them to open up a configuration dialog for that specific
instance of the component. The “Wire Tool” will allow you
to make electrical connections between components, just
like you are drawing a schematic. This tool is available on
the left edge of the schematic window and appears as a
line with boxes at the end.
Open up one of the component datasheets by either
right-clicking on the component and selecting “Open Data
Sheet…” or clicking on the link in the lower left corner of
the window. Component datasheets look very similar to
datasheets for integrated circuits. There is a general
description of the component, how to wire the component,
and how to set the various options of the component. In
addition, PSoC components also have a ‘C’ level API that is
automatically generated by the tool chain for each
component. Each API is component specific, but there are
two naming conventions worth noting. Every component
has a XXX_Start() function and XXX_Stop() function. These
functions initialize and shut down the component. When
writing software for the PSoC, you must call the
XXX_Start() API for every component in use, even if it will
operate completely independent from the processor from
that point on.
In the “Workspace Explorer,” double-click on the file
“Proximity Sense.cydwr.” This opens the Design-Wide
Resources Editor. From here, you will map nets from your
schematic to specific pins on the processor, configure
clocks, interrupts, and other system resources. Drag a pin
alias on the right-hand side of the window to a specific pin
on the processor to connect the two together.
The PSoC processor is programmed in C, and the PSoC
5 uses the GCC tool chain. The Cypress folks have gone to
great lengths to preserve a standard C environment. The
proper way to access any component is through its API.
Additionally, the processor itself has standard symbols,
defines, and API routines. It is particularly important to use
the standard APIs on the PSoC because the location of
Lloyd Moore has worked as a software and hardware
engineer in the fields of robotics, machine vision, and
industrial automation for 25 years. Presently, Lloyd is the
president of CyberData Corporation which develops custom
automation solutions worldwide.
specific hardware can move from build to build.
Additionally, when an upgrade is available, only the API is
guaranteed to be preserved. All other aspects of a
component can and do change. Let’s program the
ProximitySense demo into the First Touch™ board. Plug the
USB cable into your computer and then into the mini-USB
connector on the board. The drivers will load automatically.
Wait a few moments for this process to complete.
Now, select the “Debug -> Program” menu item. Since
the project hasn’t been built yet, this will automatically start
a compilation before programming the chip. Assuming all
goes well, the build will complete and programming will
start automatically. When everything is finished, you will see
the message “‘PSoC5 CY8C5588AX*-060’ was successfully
programmed at…” in the Output window.
Playing with CapSense
Unplug the board from the USB cable. Inside the
development, kit you will find a 9V battery and a small
wire. Plug the wire into the socket on the board marked
“Proximity Sensor.” This serves as the antenna for the
CapSense proximity sensor. Plug in the 9V battery and wave
your hand over the antenna wire. The LEDs will light up as
you get close to the wire.
At this point, you can take the board around and see
how it responds to various materials. Large objects will give
some level of response. Smaller objects will also give a
response depending on how conductive they are. More
conductive objects will have a larger response. Very thin,
non-conductive objects have the most problems being
I particularly like the ProximitySense demo as it provides
the basis for creating a non-contact object detection
system. There are many ways this demo can be enhanced
to replace bump switches. Furthermore, the level and
pattern of a response can give you clues about the object
itself. Tuning the sensor is beyond the scope of this article;
however, the CapSense component is highly configurable.
Different component settings and configurations of
antennas can also be used.
The connectors on the bottom of the First Touch board
(J2 and J3) are designed to fit into a 28-pin DIP socket. This
gives you a simple way to connect the First Touch board to
your own projects. Power can be supplied through this
connector instead of using the 9V battery contacts. P2 on
the top of the board can also be used for additional I/O.
Finally, Cypress has a series of on-demand training
videos available at: www.cypress.com/
?id=2233&rtID=134. The sessions are numbered like
college courses and should be viewed in order. The Cypress
website has a large collection of datasheets, application
notes, code examples, and other resources to support the
PSoC processors. SV
SERVO 09.2011 47