EEEEEEEEEEEEEEEEEEE
CY8CKIT-042
PSoC® 4 Pioneer Kit Guide
Doc. # 001-86371 Rev. *I
Cypress Semiconductor
198 Champion Court
San Jose, CA 95134-1709
www.cypress.com
EMPRESS
Copyrights
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 2
Copyrights
© Cypress Semiconductor Corporation, 2013-2018. This document is the property of Cypress Semiconductor Corporation
and its subsidiaries, including Spansion LLC ("Cypress"). This document, including any software or firmware included or refer-
enced in this document ("Software"), is owned by Cypress under the intellectual property laws and treaties of the United
States and other countries worldwide. Cypress reserves all rights under such laws and treaties and does not, except as spe-
cifically stated in this paragraph, grant any license under its patents, copyrights, trademarks, or other intellectual property
rights. If the Software is not accompanied by a license agreement and you do not otherwise have a written agreement with
Cypress governing the use of the Software, then Cypress hereby grants you a personal, non-exclusive, nontransferable
license (without the right to sublicense) (1) under its copyright rights in the Software (a) for Software provided in source code
form, to modify and reproduce the Software solely for use with Cypress hardware products, only internally within your organi-
zation, and (b) to distribute the Software in binary code form externally to end users (either directly or indirectly through resell-
ers and distributors), solely for use on Cypress hardware product units, and (2) under those claims of Cypress's patents that
are infringed by the Software (as provided by Cypress, unmodified) to make, use, distribute, and import the Software solely
for use with Cypress hardware products. Any other use, reproduction, modification, translation, or compilation of the Software
is prohibited.
TO THE EXTENT PERMITTED BY APPLICABLE LAW, CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, WITH REGARD TO THIS DOCUMENT OR ANY SOFTWARE OR ACCOMPANYING HARDWARE, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PUR-
POSE. No computing device can be absolutely secure. Therefore, despite security measures implemented in Cypress hard-
ware or software products, Cypress does not assume any liability arising out of any security breach, such as unauthorized
access to or use of a Cypress product. In addition, the products described in these materials may contain design defects or
errors known as errata which may cause the product to deviate from published specifications. To the extent permitted by
applicable law, Cypress reserves the right to make changes to this document without further notice.
Cypress does not assume any liability arising out of the application or use of any product or circuit described in this document.
Any information provided in this document, including any sample design information or programming code, is provided only
for reference purposes. It is the responsibility of the user of this document to properly design, program, and test the function-
ality and safety of any application made of this information and any resulting product. Cypress products are not designed,
intended, or authorized for use as critical components in systems designed or intended for the operation of weapons, weap-
ons systems, nuclear installations, life-support devices or systems, other medical devices or systems (including resuscitation
equipment and surgical implants), pollution control or hazardous substances management, or other uses where the failure of
the device or system could cause personal injury, death, or property damage ("Unintended Uses"). A critical component is
any component of a device or system whose failure to perform can be reasonably expected to cause the failure of the device
or system, or to affect its safety or effectiveness. Cypress is not liable, in whole or in part, and you shall and hereby do release
Cypress from any claim, damage, or other liability arising from or related to all Unintended Uses of Cypress products. You
shall indemnify and hold Cypress harmless from and against all claims, costs, damages, and other liabilities, including claims
for personal injury or death, arising from or related to any Unintended Uses of Cypress products.
Cypress, the Cypress logo, Spansion, the Spansion logo, and combinations thereof, WICED, PSoC, CapSense, EZ-USB, F-
RAM, and Traveo are trademarks or registered trademarks of Cypress in the United States and other countries. For a more
complete list of Cypress trademarks, visit cypress.com. Other names and brands may be claimed as property of their respec-
tive owners.
PSoC Designer, PSoC Creator, SmartSense, and CapSense Express are trademarks of Cypress Semiconductor Corpora-
tion.
{EMPRESS
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 3
Contents
Safety Information 5
1. Introduction 7
1.1 Kit Contents .................................................................................................................7
1.2 PSoC Creator™...........................................................................................................9
1.3 Getting Started.............................................................................................................9
1.4 Additional Learning Resources..................................................................................10
1.4.1 PSoC Creator.................................................................................................11
1.4.2 PSoC Creator Code Examples ......................................................................12
1.4.3 PSoC Creator Help ........................................................................................12
1.4.4 Technical Support...........................................................................................13
1.5 Documentation Conventions......................................................................................13
2. Software Installation 14
2.1 Install Kit Software .....................................................................................................14
2.2 Uninstall Software......................................................................................................16
3. Kit Operation 17
3.1 Pioneer Kit USB Connection......................................................................................18
3.2 Programming and Debugging PSoC 4 ......................................................................19
3.2.1 Using the Onboard PSoC 5LP Programmer and Debugger ..........................19
3.2.2 Using CY8CKIT-002 MiniProg3 Programmer and Debugger.........................21
3.3 USB-UART Bridge .....................................................................................................22
3.4 USB-I2C Bridge .........................................................................................................24
3.5 Updating the Onboard Programmer Firmware ..........................................................25
4. Hardware 27
4.1 Board Details .............................................................................................................27
4.2 Theory of Operation...................................................................................................29
4.3 Functional Description ...............................................................................................30
4.3.1 PSoC 4...........................................................................................................30
4.3.2 PSoC 5LP ......................................................................................................31
4.3.3 Power Supply System ....................................................................................33
4.3.4 Programming Interface...................................................................................35
4.3.5 Arduino Compatible Headers (J1, J2, J3, J4, and J12 - unpopulated)...........36
4.3.6 Digilent Pmod Compatible Header (J5 - unpopulated)...................................38
4.3.7 PSoC 5LP GPIO Header (J8) ........................................................................39
4.3.8 CapSense Slider ............................................................................................40
4.3.9 Pioneer Board LEDs ......................................................................................41
4.3.10 Push Buttons..................................................................................................42
EMPRESS
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 4
Contents
5. Code Examples 43
5.1 Using the Kit Code Examples ....................................................................................43
5.2 Using the Micrium® µC/Probe® Projects ..................................................................46
5.3 Blinking LED ..............................................................................................................47
5.3.1 Project Description .........................................................................................47
5.3.2 Hardware Connections...................................................................................47
5.3.3 Flow Chart......................................................................................................48
5.3.4 Verify Output ..................................................................................................48
5.4 PWM ..........................................................................................................................49
5.4.1 Project Description .........................................................................................49
5.4.2 Hardware Connections...................................................................................49
5.4.3 Flow Chart......................................................................................................50
5.4.4 Verify Output ..................................................................................................50
5.5 Deep Sleep ................................................................................................................51
5.5.1 Project Description .........................................................................................51
5.5.2 Hardware Connections...................................................................................51
5.5.3 Flow Chart......................................................................................................53
5.5.4 Verify Output ..................................................................................................53
5.6 CapSense ..................................................................................................................54
5.6.1 CapSense (Without Tuning)...........................................................................54
5.6.2 CapSense (With Tuning)................................................................................57
6. Advanced Topics 65
6.1 Using PSoC 5LP as a USB-UART Bridge .................................................................65
6.2 Using PSoC 5LP as USB-I2C Bridge ........................................................................79
6.3 Developing Applications for PSoC 5LP .....................................................................88
6.3.1 Building a Bootloadable Project for PSoC 5LP ..............................................88
6.3.2 Building a Normal Project for PSoC 5LP........................................................97
6.4 PSoC 5LP Factory Program Restore Instructions ...................................................100
6.4.1 PSoC 5LP is Programmed with a Bootloadable Application ........................100
6.4.2 PSoC 5LP is Programmed with a Standard Application...............................105
6.5 Using µC/Probe Tool ...............................................................................................107
6.5.1 CapSense Code Example............................................................................108
6.5.2 PWM Code Example....................................................................................114
A. Appendix 116
A.1 CY8CKIT-042 Schematics.......................................................................................116
A.2 Pin Assignment Table..............................................................................................120
A.3 Program and Debug Headers..................................................................................123
A.4 Use of Zero-ohm Resistors and No Load ................................................................124
A.5 Error in Firmware/Status Indication in Status LED ..................................................124
A.6 Bill of Materials (BOM).............................................................................................125
A.7 Regulatory Compliance Information ........................................................................127
A.8 Migrating projects across different Pioneer series kits ............................................128
Revision History 132
nnnnnnnnnnnnnnnnn
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 5
Safety Information
Regulatory Compliance
The CY8CKIT-042 PSoC® 4 Pioneer Kit is intended for use as a development platform for hardware
or software in a laboratory environment. The board is an open system design, which does not
include a shielded enclosure. Due to this reason, the board may cause interference to other
electrical or electronic devices in close proximity. In a domestic environment, this product may cause
radio interference. In such cases, the user may be required to take adequate preventive measures.
Also, this board should not be used near any medical equipment or RF devices.
Attaching additional wiring to this product or modifying the product operation from the factory default
may affect its performance and cause interference with other apparatus in the immediate vicinity. If
such interference is detected, suitable mitigating measures should be taken.
The CY8CKIT-042 as shipped from the factory has been verified to meet with requirements of CE as
a Class A product.
The CY8CKIT-042 contains electrostatic discharge (ESD) sensitive
devices. Electrostatic charges readily accumulate on the human body
and any equipment, and can discharge without detection. Permanent
damage may occur on devices subjected to high-energy discharges.
Proper ESD precautions are recommended to avoid performance
degradation or loss of functionality. Store unused CY8CKIT-042
boards in the protective shipping package.
End-of-Life/Product Recycling
This kit has an end-of-life cycle five years from the date of
manufacturing mentioned on the back of the box. Contact your nearest
recycler for discarding the kit.
EMPRESS
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 6
General Safety Instructions
ESD Protection
ESD can damage boards and associated components. Cypress recommends that the user perform
procedures only at an ESD workstation. If an ESD workstation is not available, use appropriate ESD
protection by wearing an antistatic wrist strap attached to the chassis ground (any unpainted metal
surface) on the board when handling parts.
Handling Boards
CY8CKIT-042 boards are sensitive to ESD. Hold the board only by its edges. After removing the
board from its box, place it on a grounded, static free surface. Use a conductive foam pad if
available. Do not slide board over any surface.
{EMPRESS
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 7
1. Introduction
Thank you for your interest in the PSoC® 4 Pioneer Kit. The kit is designed as an easy-to-use and
inexpensive development kit, showcasing the unique flexibility of the PSoC 4 architecture. Designed
for flexibility, this kit offers footprint-compatibility with several third-party Arduino™ shields. This kit
has a provision to populate an extra header to support Digilent® Pmod™ peripheral modules. In
addition, the board features a CapSense® slider, an RGB LED, a push button switch, an integrated
USB programmer, a program and debug header, and USB-UART/I2C bridges. This kit supports
either 5 V or 3.3 V as power supply voltages.
The PSoC 4 Pioneer Kit is based on the PSoC 4200 device family, delivering a programmable
platform for a wide range of embedded applications. The PSoC 4 is a scalable and reconfigurable
platform architecture for a family of mixed-signal programmable embedded system controllers with
an Arm® Cortex™-M0 CPU. It combines programmable and reconfigurable analog and digital blocks
with flexible automatic routing.
1.1 Kit Contents
The PSoC 4 Pioneer kit contains:
PSoC 4 Pioneer board
Quick Start Guide
USB Standard-A to Mini-B cable
Six jumper wires
CYPRESS ' mmm m voununw , u Ann CYPRESS PROGRAMMABLE SYSTEMVONVCHI? SOLUHON CYECK‘T—O42 P500?” 4 P‘ONEER K‘T Fenluvmg m Mm. Sumac-i IL
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 8
Introduction
Figure 1-1. Kit Contents
Inspect the contents of the kit; if you find any part missing, contact your nearest Cypress sales office
for help: www.cypress.com/support.
EMPRESS
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 9
Introduction
1.2 PSoC Creator™
PSoC Creator is a state-of-the-art, easy-to-use integrated design environment (IDE). It introduces
revolutionary hardware and software co-design, powered by a library of pre-verified and pre-
characterized PSoC Components™.
With PSoC Creator, you can:
Drag and drop PSoC components to build a schematic of your custom design
Automatically place and route components and configure GPIOs
Develop and debug firmware using the included component APIs
PSoC Creator also enables you to tap into an entire tools ecosystem with integrated compiler chains
and production programmers for PSoC devices.
For more information, visit www.cypress.com/creator.
1.3 Getting Started
This guide helps you to get acquainted with the PSoC 4 Pioneer Kit.
The Software Installation chapter on page 14 describes the installation of the kit software.
The Kit Operation chapter on page 17 explains how to program the PSoC 4 with a programmer
and debugger – either the onboard PSoC 5LP or the external MiniProg3 (CY8CKIT-002).
The Hardware chapter on page 27 details the hardware operation.
The Code Examples chapter on page 43 describes the code examples.
The Advanced Topics chapter on page 65 deals with topics such as building projects for
PSoC 5LP, USB-UART functionality, and USB-I2C functionality of PSoC 5LP.
The Appendix on page 116 provides the schematics, pin assignment, use of zero-ohm resistors,
troubleshooting, and the bill of materials (BOM).
EMPRESS
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 10
Introduction
1.4 Additional Learning Resources
Cypress provides a wealth of data at www.cypress.com to help you to select the right PSoC device
for your design, and to help you to quickly and effectively integrate the device into your design. For a
comprehensive list of resources, see KBA86521, How to Design with PSoC 3, PSoC 4, and
PSoC 5LP. The following is an abbreviated list for PSoC 4:
Overview: PSoC Portfolio, PSoC Roadmap
Product Selectors: PSoC 1, PSoC 3, PSoC 4, or PSoC 5LP. In addition, PSoC Creator includes
a device selection tool.
Datasheets: Describe and provide electrical specifications for the PSoC 4000, PSoC 4100, and
PSoC 4200 device families.
CapSense Design Guide: Learn how to design capacitive touch-sensing applications with the
PSoC 4 family of devices.
Application Notes and Code Examples: Cover a broad range of topics, from basic to advanced
level. Many of the application notes include code examples. Visit the PSoC 3/4/5 Code Examples
webpage for a list of all available PSoC Creator code examples. For accessing code examples
from within PSoC Creator – see PSoC Creator Code Examples on page 12.
Technical Reference Manuals (TRM): Provide detailed descriptions of the architecture and
registers in each PSoC 4 device family.
Development Kits:
CY8CKIT-042 and CY8CKIT-040, PSoC 4 Pioneer Kits, are easy-to-use and inexpensive
development platforms. These kits include connectors for Arduino compatible shields and
Digilent Pmod daughter cards.
CY8CKIT-049 is a very low-cost prototyping platform for sampling PSoC 4 devices.
CY8CKIT-001 is a common development platform for all PSoC family devices.
The MiniProg3 device provides an interface for flash programming and debug.
Knowledge Base Articles (KBA): Provide design and application tips from experts on the
devices/kits. For instance, KBA93541, explains how to use CY8CKIT-049 to program another
PSoC 4.
For a list of trainings on PSoC Creator, visit www.cypress.com/training.
@chREss «mm m wnunw
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 11
Introduction
1.4.1 PSoC Creator
PSoC Creator is a free Windows-based integrated design environment (IDE). It enables concurrent
hardware and firmware design of systems based on PSoC 3, PSoC 4, and PSoC 5LP. See
Figure 1-2 – with PSoC Creator, you can:
1. Drag and drop Components to build your hardware system design in the main design workspace
2. Codesign your application firmware with the PSoC hardware
3. Configure Components using configuration tools
4. Explore the library of 100+ Components
5. Access Component datasheets
Figure 1-2. PSoC Creator Features
Visit PSoC Creator training page for video tutorials on learning and using PSoC Creator.
YPRESS‘ mum-1mm mum-m Learn Getting Acquainted New in 4.2 News and Infolmation Start Create New Project. Open Existing Project... Find Code Example 3 Kiis ’31
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 12
Introduction
1.4.2 PSoC Creator Code Examples
PSoC Creator includes a large number of code examples. These examples are accessible from the
PSoC Creator Start Page, as Figure 1-3 shows.
Code examples can speed up your design process by starting you off with a complete design,
instead of a blank page. They also show how PSoC Creator Components can be used for various
applications.
In the Find Code Example dialog, you have several options:
Filter for examples based on device family or keyword.
Select from the list of examples offered based on the Filter Options.
View the project documentation for the selection (on the Documentation tab).
View the code for the selection on the Sample Code tab. You can copy the code from this win-
dow and paste to your project, which can help speed up code development.
Create a new workspace for the code example or add to your existing workspace. This can
speed up your design process by starting you off with a complete, basic design. You can then
adapt that design to your application.
Figure 1-3. Code Examples in PSoC Creator
1.4.3 PSoC Creator Help
Visit the PSoC Creator home page to download the latest version of PSoC Creator. Then, launch
PSoC Creator and navigate to the following items:
Quick Start Guide: Choose Help > Documentation > Quick Start Guide. This guide gives you
the basics for developing PSoC Creator projects.
Simple Component Code Examples: Choose File > Code Example. These code examples
demonstrate how to configure and use PSoC Creator Components. To access code examples
related to a specific Component, place the Component on the TopDesign schematic and right-
click on the Component. Select the Find Code Example option in the context menu that
appears.
System Reference Guide: Choose Help > System Reference Guide. This guide lists and
describes the system functions provided by PSoC Creator.
Component Datasheets: Right-click a Component and select Open Datasheet. Visit the
PSoC 4 Component Datasheets page for a list of all PSoC 4 Component datasheets.
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 13
Introduction
1.4.4 Technical Support
If you have any questions, our technical support team is happy to assist you. You can create a sup-
port request on the Cypress Technical Support page.
If you are in the United States, you can talk to our technical support team by calling our toll-free num-
ber: +1-800-541-4736. Select option 3 at the prompt.
You can also use the following support resources if you need quick assistance.
Self-help.
Local Sales Office Locations.
1.5 Documentation Conventions
Table 1-1. Document Conventions for Guides
Convention Usage
Courier New Displays file locations, user entered text, and source code:
C:\ ...cd\icc\
Italics Displays file names and reference documentation:
Read about the sourcefile.hex file in the PSoC Creator User Guide.
[Bracketed, Bold]Displays keyboard commands in procedures:
[Enter] or [Ctrl] [C]
File > Open Represents menu paths:
File > Open > New Project
Bold Displays commands, menu paths, and icon names in procedures:
Click the File icon and then click Open.
Times New Roman Displays an equation:
2 + 2 = 4
Text in gray boxes Describes cautions or unique functionality of the product.
{EMPRESS
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 14
2. Software Installation
2.1 Install Kit Software
Follow these steps to install the CY8CKIT-042 PSoC 4 Pioneer Kit software:
1. Download the kit software from www.cypress.com/CY8CKIT-042. The kit software is available for
download in three formats.
a. CY8CKIT-042 Kit Complete Setup: This installation package contains the files related to the
kit including PSoC Creator and PSoC Programmer. However, it does not include the Windows
Installer or Microsoft .NET framework packages. If these packages are not on your computer,
the installer directs you to download and install them from the Internet.
b. CY8CKIT-042 Kit Only: This executable file installs only the kit contents, which include kit
code examples, hardware files, and user documents. This package can be used if all the
software prerequisites (listed in step 5) are installed on your computer.
c. CY8CKIT-042 DVD ISO: This file is a complete package, stored in a DVD-ROM image format,
which you can use to create a DVD or extract using an ISO extraction program such as
WinZip® or WinRAR. The file can also be mounted similar to a virtual CD/DVD using virtual
drive programs such as Virtual CloneDrive and MagicISO. This file includes all the required
software, utilities, drivers, hardware files, and user documents.
2. If you have downloaded the ISO file, mount it in a virtual drive. Extract the ISO contents if you do
not have a virtual drive to mount. Double-click cyautorun.exe in the root directory of the extracted
content or mounted ISO if "Autorun from CD/DVD" is not enabled on the computer. The
installation window will appear automatically.
Note: If you are using the "Kit Complete Setup" or "Kit Only" file, then go to step 4 for
installation.
CYPRESS (Minna: m munnuw D. CVEUIHMZ PM 4 Pmnzrr m ' mama: w mmmknw , ““ I CYBCKIT-042 PS C 4 P‘ K‘t “L“ w“ I 0 Ioneer I \ Open an m user‘s Gmdam \ ‘1an cvscm-w Psnc 4P‘nneer mm \ Em n; QOVECypmss Scmxmnducmr Commune" AH nghfis mscrwxl
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 15
Software Installation
3. Click Install CY8CKIT-042 PSoC 4 Pioneer Kit to start the kit installation, as shown in
Figure 2-1.
Figure 2-1. Kit Installer Screen
4. Select the directory in which you want to install the files related to the CY8CKIT-042 PSoC 4
Pioneer Kit. Choose the directory and click Next.
5. The CY8CKIT-042 PSoC 4 Pioneer Kit installer automatically installs the required software, if it is
not present on your computer. Following are the required software:
a. PSoC Creator 4.2 or later: This software is also available at www.cypress.com/psoccreator.
b. PSoC Programmer 3.27.1 or later: This is installed as part of PSoC Creator installation
(www.cypress.com/programmer).
6. Choose the Typical, Custom, or Complete installation type (select Typical if you do not know
which one to select) in the Product Installation Overview window, as shown in Figure 2-2. Click
Next after you select the installation type.
CYPRESS mama m wunllnw ; cylnnzlururummmuxamm Find-x has...” memimemhamwm Owlh'w'dI-zhm m cmrmmAm—n Imulnm m- “human-alumni mcmwmtwn
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 16
Software Installation
Figure 2-2. Product Installation Overview
7. Read the License agreement and select I accept the terms in the license agreement to
continue with the installation. Click Next.
8. When the installation begins, a list of packages appears on the installation page. A green check
mark appears next to each package after successful installation.
9. Enter your contact information or select the Continue Without Contact Information check box.
Click Finish to complete the kit installation.
10.After the installation is complete, the kit contents are available at the following location:
<Install_Directory>\CY8CKIT-042 PSoC 4 Pioneer Kit
Default location:
Windows OS (64-bit):
C:\Program Files (x86)\Cypress\CY8CKIT-042 PSoC 4 Pioneer Kit
Windows OS (32-bit):
C:\Program Files\Cypress\CY8CKIT-042 PSoC 4 Pioneer Kit
Note: For Windows 7/8/8.1/10 users, the installed files and the folder are read-only. To use the
installed code examples, follow the steps outlined in the Code Examples chapter on page 43. These
steps will create an editable copy of the example in a path that you choose, so the original installed
example is not modified.
2.2 Uninstall Software
The software can be uninstalled using one of the following methods:
1. Go to Start > All Programs > Cypress > Cypress Update Manager and select the Uninstall
button next to the product that needs to be uninstalled.
2. Go to Start > Control Panel > Programs and Features for Windows 7 or Add/Remove
Programs for Windows XP and select the Uninstall button.
:3cmass 50 Use
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 17
3. Kit Operation
The PSoC 4 Pioneer Kit can be used to develop applications using the PSoC 4 family of devices and
the Arduino shields and Digilent Pmod daughter cards. Figure 3-1 is an image of the PSoC 4
Pioneer board with a markup of the onboard components.
Figure 3-1. PSoC 4 Pioneer Board
Programmer
StatusLED
USBConnector
(J10)
PowerLED
PSoC4Additional
ProgramHeader(J6)
PSoC5LPI/O
Header(J8)
PSoC4
Reset
Button
DigilentPmod
Compatible
I/OHeader(J5)
SystemPower
SupplyJumper
(J9)
Arduino
Compatible
I/OHeader(J3)
Arduino
Compatible
I/OHeader(J4)
Arduino
Compatible
I/OHeader
(J1)
PSoC5LP
Programmer
and
Debugger
User
Button
PSoC4
44TQFP
Arduino
Compatible
I/OHeader
(J2)
VIN(J11)
10‐PinSWD
DebugandProgramming
Header(J7)forPSoC5LP
RGB
LED
PSoC4
PowerSupply
Jumper(J13)
Arduino
CompatibleICSP
I/OHeader(J12)
CapSense
Slider
YPRESS‘ mum m munllnw , 3 Wrmbmlm Your device is ready to use use Cmpofite Dark: use 1mm Devin mmg (11.33) mm; llSB-UAKT (cows) Jkudymus: Jkudymus: ¢Mmusc Jkadymuse
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 18
Kit Operation
3.1 Pioneer Kit USB Connection
The PSoC 4 Pioneer Kit connects to the PC over a USB interface. The kit enumerates as a
composite device and three separate devices appear under the Device Manager window in the
Windows operating system.
Table 3-1. PSoC 4 Pioneer Kit in Device Manager After Enumeration
Figure 3-2. KitProg Driver Installation
Port Description
USB Composite Device Composite device
USB Input Device USB-I2C bridge, KitProg command interface
KitProg Programmer and debugger
KitProg USB-UART USB-UART bridge, which appears as the COM# port
:iCYPRESS' ' EMIEunm m munnnw
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 19
Kit Operation
3.2 Programming and Debugging PSoC 4
The kit allows programming and debugging of the PSoC 4 device in two modes:
Using the onboard PSoC 5LP programmer and debugger
Using a CY8CKIT-002 MiniProg3 programmer and debugger
3.2.1 Using the Onboard PSoC 5LP Programmer and Debugger
The default programming interface for the kit is a USB-based, onboard programming interface.
Before trying to program the device, PSoC Creator and PSoC Programmer must be installed. See
Install Kit Software on page 14 for information on installing the kit software.
1. To program the device, plug the USB cable into the programming USB connector J10, as shown
in Figure 3-3. The kit will enumerate as a composite device. See Pioneer Kit USB Connection on
page 18 for details.
Figure 3-3. Connect USB Cable to J10
2. The onboard PSoC 5LP uses serial wire debug (SWD) to program the PSoC 4 device. See
Figure 3-4 for this implementation.
Figure 3-4. SWD Programming PSoC 4 Using PSoC 5LP
PSoC 5LP PSoC 4
SWDCLK
SWDIO
Reset
P2[1]
P2[0]
P2[4]
P3[3]
P3[2]
XRES
Mini
USB D-
D+ P15[6]
P15[7]
VDD
CYPRESS mum m iuuuiuuw F'le gill: mew Emject 'J 33 i ail 6 a bi guild erug Iools flindow Help Bu'ld Bll'rll'ing LED SHMFG . lfi'a fill UK 4—1. mm Q a Watkzpece'fillnkmg LED‘ (1 P E E v E TupDesigi qscri » 3% almkmg IED uldur El E Hedda! Fllel [Ell] L; i» ma Clean and Bulk! Blinking LED Clean Blmking LED l;u_ \ul Co” . l e F 5 Geneva: Application Genetate Project Datum 3 device h El 5 Source Flles £1 mum c a GammarLSmme file gait mew Emject guild E'Jfiialfiaukba ranal Elva M13}, gu Emanu- culars ~10 W may.“ i Select Debug Ialgetn Q a 1: thug F5 Workspeoe‘fillnklng LED (1 Frqscu) . E E .Pml .mmthEu [cram {fig Debug gimmn ngvammlng Alurs ' fl' TuvDequn cvsch 3 mm in Running Target... ~ 3% Blinking |£D swim a: mine: I Toggle Bleakpoim F5 - _-1 device h l 96 Source Files New BMW" ‘ g] malnc ,0 We Pie AH : El: Wetsimice , FSW ~J ll V x b (Jack a . ls] Clock: if - LnJ - a: cum i 1 u cmflgcl: ld ‘7 x; D CmflReule scat
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 20
Kit Operation
3. The Pioneer Kit’s onboard programmer will enumerate on the PC and in the software tools as
KitProg. Load a code example in PSoC Creator (such as the examples described in the Code
Examples chapter on page 43) and initiate the build by clicking Build > Build Project or
[Shift]+[F6].
Figure 3-5. Build Project in PSoC Creator
4. After the project is built without errors and warnings, select Debug > Program or [Ctrl]+[F5] to
program the device.
Figure 3-6. Program Device from PSoC Creator
The onboard programmer supports only the RESET programming mode. When using the onboard
programmer, the board can either be powered by the USB (VBUS) or by an external source such as
an Arduino shield. If the board is already powered from another source, plugging in the USB
programmer does not damage the board.
‘CYPRESS' mum w vnunnuw
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 21
Kit Operation
3.2.2 Using CY8CKIT-002 MiniProg3 Programmer and Debugger
The PSoC 4 on the Pioneer Kit can also be programmed using a MiniProg3 (CY8CKIT-002). To use
MiniProg3 for programming, use the J6 connector on the board, as shown in Figure 3-7.
The board can also be powered from the MiniProg3. To do this, select Tool > Options. In the
Options window, expand Program and Debug > Port Configuration; click MiniProg3 and select
the settings shown in Figure 3-8. Click Debug > Program to program and power the board.
Note: The CY8CKIT-002 MiniProg3 is not part of the PSoC 4 Pioneer Kit contents. It can be
purchased from the Cypress Online Store.
Figure 3-7. PSoC 4 Programming/Debugging Using MiniProg3
CYPRESS mama m wunllnw
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 22
Kit Operation
Figure 3-8. MiniProg3 Configuration
Note: See the Programmer User Guide for more information on programming using a MiniProg3.
3.3 USB-UART Bridge
The onboard PSoC 5LP can also act as a USB-UART bridge to transfer and receive data from the
PSoC 4 device to the PC via the COM terminal software. When the USB mini-B cable is connected
to J10 of the PSoC 4 Pioneer Kit, a device named KitProg USB-UART is available under Ports
(COM & LPT) in the device manager. For more details about the USB-UART functionality, see Using
PSoC 5LP as a USB-UART Bridge on page 65.
To use the USB-UART functionality in the COM terminal software, select the corresponding COM
port as the communication port for transferring data to and from the COM terminal software.
The UART lines from PSoC 5LP are brought to the P12[6] (J8.9) and P12[7] (J8.10) pins of header
J8. This interface can be used to send or receive data from any PSoC 4 design that has a UART by
connecting the pins on header J8 to the RX and TX pins assigned in PSoC 4. The UART can be
used as an additional interface to debug designs. This bridge can also be used to interface with
other external UART-based devices. Figure 3-9 shows the connection between the RX and TX lines
of the PSoC 5LP and PSoC 4. In this example, the PSoC 4 UART has been routed to the J4 header;
the user must connect the wires between the PSoC 5LP RX and TX lines available on header J8.
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 23
Kit Operation
Figure 3-9. Example RX and TX Line Connection of PSoC 5LP and PSoC 4
Tab l e 3- 2 lists the specifications supported by the USB-UART bridge.
Table 3-2. Specifications Supported by USB-UART Bridge
Parameter Supported Values
Baud Rate 1200, 2400, 4800, 9600, 19200, 38400, 57600, and 115200
Data Bits 8
Parity None
Stop Bits 1
Flow Control None
File transfer protocols
supported
Xmodem, 1K Xmodem, Ymodem, Kermit, and Zmodem (only speeds greater
than 2400 baud).
CYPRESS mum m Inunluw ‘twa’ m m M gm M M, in ‘ ah! 0E EE- WcImIY-IIIHI- 1 Select Part: 1:: me Format. man my to cmnt A mung m: succaufully Com-cud :u um/uzznzanauuoo mum Vin-ion 2,00 5-1“: Putt 1:. m “nun, can try :9 “ma: Comm Mon m mm W ‘ ‘ mum“ m. M H ‘ “may
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 24
Kit Operation
3.4 USB-I2C Bridge
The PSoC 5LP also functions as a USB-I2C bridge. The PSoC 4 communicates with the PSoC 5LP
using an I2C interface and the PSoC 5LP transfers the data over the USB to the USB-I2C software
utility on the PC, called the Bridge Control Panel (BCP).
The BCP is available as part of the PSoC Programmer installation. This software can be used to
send and receive USB-I2C data from the PSoC 5LP. When the USB mini-B cable is connected to
header J10 on the Pioneer Kit, the KitProg/<serial_number> is available under Connected I2C/
SPI/RX8 Ports in the BCP.
Figure 3-10. Bridge Control Panel
To use the USB_I2C functionality, select the KitProg/<serial_number> in the BCP. On successful
connection, the Connected and Powered tabs turn green.
CYPRESS mum m voununw in: mm gun mm M; new 3 a u . 3 0E :22 TM cm mm m KitProg Vernon 2.00 Select Part 1.. the Furnish, than try :5 mnnent Dpaniuq Part: Sncmssfully Gunmen-d to Kitpzag/JZZZI‘IZEOZZUADD Rickey Version 2.00 «E 9 wmmmm This programmev is mummy um mam, n. mum—e ”—2 urn-e 0.0.: mfiaTfiankWfimr—e m HMMmmmm E
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 25
Kit Operation
Figure 3-11. KitProg USB-I2C Connected in Bridge Control Panel
USB-I2C is implemented using the USB and I2C components of PSoC 5LP. The SCL (P12_0) and
SDA (P12_1) lines from the PSoC 5LP are connected to SCL (P3_0) and SDA (P3_1) lines of the
PSoC 4 I2C. The USB-I2C bridge currently supports I2C speed of 50 kHz, 100 kHz, 400 kHz, and
1MHz.
Refer to Using PSoC 5LP as USB-I2C Bridge on page 79 for building a project, which uses USB-I2C
Bridge functionality.
3.5 Updating the Onboard Programmer Firmware
The firmware of the onboard programmer and debugger, PSoC 5LP, can be updated from PSoC
Programmer. When a new firmware is available or when the KitProg firmware is corrupt (see Error in
Firmware/Status Indication in Status LED on page 124), PSoC Programmer displays a warning
indicating that new firmware is available.
Open PSoC Programmer from Start > All Programs > Cypress > PSoC Programmer<version>.
When PSoC Programmer opens, a WARNING! window pops up saying that the programmer is
currently out of date.
Figure 3-12. Firmware Update Warning
G‘CYPREss mum w munuuw V mvmqnmm -~—— -—- ¢~_ -.o fik \firw Opfmm nap "‘.LE‘%@%DB Pmsdm 11> W'umms, me Imwlmgmmmm mmwmmxm Mmmuumnmm mm mm um mum/mama; Mm, “mm mm mm... m we mm“, m and am m Wang M...“ mm | on“ m w Uscsznnzbm... “145576 msn m“ on“ muy m m mam. you 09de um. am...” an. mm, mam mum, 2.19. m: mm 2.17. 09:11an Pan: 3: 3:45 n5 PH Comma a: anema m KzCqu/mnnsznnnzsunn sum mm 11: cu: amuse, chm try :0 connect Hmnry mm mu (m an 1.. mum at: m mecca-11521475.. mum mun nym W...“ -—\ vmpmmm o — 0..."- El: mu clam Hap i )x EUEUQBDB W «me I MWIWE‘SZW Wm mmmmamu-m Bum mmmmmmm mm» mom Dim:- mmnzwsm' Mm, mm” “Ema “mm- mung finml-Vuwul m...“ aw.“ Emma u 3 53.3, m Sucw=dtd V=rxfyan. .. _nmmmmumg "Pal-1mm]. .. Inxcxulxxlnq. .. Inn-lam amt“. Ileana-cad a: 1:5: an m muse puma an the awn“. m, and clxck me Upgrade meuaze you mad um. Waning: a: . g a 1mm; “mm, 2:9!“an 2 19, Du: mm 2.”. open“; Part 3: 3:52:47 m Connected .: 3 52 4s m nwmg/mmggmmmun
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 26
Kit Operation
Click OK to close the window. On closing the warning window, the Action and Results window
displays “Please navigate to the Utilities tab and click the Upgrade Firmware button”.
Figure 3-13. Upgrade Firmware Message in PSoC Programmer
Click the Utilities tab and click the Upgrade Firmware button. On successful upgrade, the Action
and Results window displays the firmware update message with the KitProg version.
Figure 3-14. Firmware Updated in PSoC Programmer
*GYPRESS' EHaEnnED m tnNnRRuw sum So 52
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 27
4. Hardware
4.1 Board Details
The PSoC 4 Pioneer Kit consists of the following blocks:
PSoC 4
PSoC 5LP
Power supply system
Programming interfaces (J6, J7 - unpopulated, J10)
Arduino compatible headers (J1, J2, J3, J4, and J12 - unpopulated)
Digilent Pmod compatible header (J5 - unpopulated)
PSoC 5LP GPIO header (J8)
CapSense slider
Pioneer board LEDs
Push buttons (Reset and User buttons)
Figure 4-1. PSoC 4 Pioneer Kit Details
Programmer
StatusLED
USBConnector
(J10)
PowerLED
PSoC4Additional
ProgramHeader(J6)
PSoC5LPI/O
Header(J8)
PSoC4
Reset
Button
DigilentPmod
Compatible
I/OHeader(J5)
SystemPower
SupplyJumper
(J9)
Arduino
Compatible
I/OHeader(J3)
Arduino
Compatible
I/OHeader(J4)
Arduino
Compatible
I/OHeader
(J1)
PSoC5LP
Programmer
and
Debugger
User
Button
PSoC4
44TQFP
Arduino
Compatible
I/OHeader
(J2)
VIN(J11)
10‐PinSWD
DebugandProgramming
Header(J7)forPSoC5LP
RGB
LED
PSoC4
PowerSupply
Jumper(J13)
Arduino
CompatibleICSP
I/OHeader(J12)
CapSense
Slider
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 28
Hardware
Figure 4-2. PSoC 4 Pioneer Kit Pin Mapping
Arduino
Compatible
I/O Header (J3)
Arduino
Compatible
I/O Header (J4)
Arduino
Compatible
I/O Header (J2)
Arduino
Compatible
I/O Header (J1)
Digilent Pmod
Compatible
I/O Header (J5)
PSoC 5LP
I/O Header (J8)
P4_0
P4_1
P1_7/AREF
GND/GND
P0_6/D13
P3_1/D12
P3_0/D11
P3_4/D10
P3_6/D9
P2_6/D8
P2_7/D7
P1_0/D6
P3_5/D5
P0_0/D4
P3_7/D3
P0_7/D2
P0_5/D1
P0_4/D0
A0/P2_0
A1/P2_1
A2/P2_2
A3/P2_3
A4/P2_4
A5/P2_5
P0_0
P0_1
P1_0
P0_2
P0_3
VDD
P1_5
P1_4
P1_3
GND
P1_2
P1_1
NC
OREF/P4_VDD
RESET/RESET
3.3V/V3.3_EXT
5V/VBUS
GND/GND
GND/GND
Vin/VIN
VCC/P4_VDD
GND/GND
SCK/P0_6
MISO/P3_1
MOSI/P3_0
SS/P3_5
P5_VDD
P0_0
P3_4
P3_6
P12_6
GND
P3_0
P12_7
P3_7
P3_5
P0_1
P1_2
Arduino UNO PSoC 4 Pioneer Kit Digilent Pmod
I
CYPRESS mama: m munllnw FSnC 4 Ardmnn Cwmpitihl: Hgaders USE Mlm s CapSense Slider m E g Puwer LED LDO vnn m J 2 g smus LED iZC/SW m D' PsaCSLP 5WD p50“ PSDC 5 10pm RE n pmg “my Psnct mum pin Rem Eulmn onev headef P506 5 Extension Header Dlgllem PMOD card header 4‘ User Button
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 29
Hardware
4.2 Theory of Operation
This section provides the block-level description of the PSoC 4 Pioneer Kit.
Figure 4-3. Block Diagram
The PSoC 4 is a new generation of programmable system-on-chip devices from Cypress for
embedded applications. It combines programmable analog, programmable digital logic,
programmable I/O, and a high-performance Arm Cortex-M0 subsystem. With the PSoC 4, you can
create the combination of peripherals required to meet the application specifications.
The PSoC 4 Pioneer Kit features an onboard PSoC 5LP, which communicates through the USB to
program and debug the PSoC 4 using serial wire debug (SWD). The PSoC 5LP also functions as a
USB-I2C bridge and USB-UART bridge.
The Pioneer Kit has an RGB LED, a status LED, and a power LED. The RGB LED is connected to
the PSoC 4 and the status LED is connected to the PSoC 5LP. For more information on the status
LED, see section A.5 Error in Firmware/Status Indication in Status LED on page 124. This kit also
includes a reset button that connects to the PSoC 4 XRES, a user button, and a five-segment
CapSense slider, which can be used to develop touch-based applications. The PSoC 4 pins are
brought out onto headers J1 to J4 on the kit to support Arduino shields. The PSoC 5LP pins are
brought out onto header J8 to enable using the onboard PSoC 5LP to develop custom applications.
The PSoC 4 Pioneer Kit can be powered from the USB Mini B, the Arduino compatible header, or an
external power supply. The input voltage is regulated by a low drop-out (LDO) regulator to 3.3 V. You
can select between VBUS (5 V) and 3.3 V by suitably plugging the jumper onto the voltage selection
header VDD.
EMPRESS
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 30
Hardware
4.3 Functional Description
4.3.1 PSoC 4
This kit uses the PSoC 4200 family device. PSoC 4200 devices are a combination of a
microcontroller with programmable logic, high-performance analog-to-digital conversion, two
opamps with comparator mode, and commonly used fixed-function peripherals. For more
information, refer to the PSoC 4 webpage and the PSoC 4200 family datasheet.
Features
32-bit MCU subsystem
48 MHz Arm Cortex-M0 CPU with single cycle multiply
Up to 32 KB of flash with read accelerator
Up to 4 KB of SRAM
Programmable analog
Two opamps with reconfigurable high-drive external and high-bandwidth internal drive, com-
parator modes, and ADC input buffering capability
12-bit 1-Msps SAR ADC with differential and single-ended modes; channel sequencer with
signal averaging
Two current DACs (IDACs) for general-purpose or capacitive sensing applications on any pin
Two low-power comparators that operate in deep sleep
Programmable digital
Four programmable logic blocks called universal digital blocks (UDBs), each with eight Macro-
cells and data path
Cypress-provided peripheral component library, user-defined state machines, and Verilog
input
Low power 1.71 to 5.5 V operation
20-nA Stop mode with GPIO pin wakeup
Hibernate and Deep-Sleep modes allow wakeup-time versus power trade-offs
Capacitive sensing
Cypress Capacitive Sigma-Delta (CSD) provides best-in-class SNR (greater than 5:1) and
water tolerance
Cypress-supplied software component makes capacitive sensing design easy
Automatic hardware tuning (SmartSense™)
Segment LCD drive
LCD drive supported on all pins (common or segment)
Operates in Deep-Sleep mode with 4 bits per pin memory
Serial communication
Two independent run-time reconfigurable serial communication blocks (SCBs) with re-config-
urable I2C, SPI, or UART functionality
Timing and pulse-width modulation
Four 16-bit Timer/Counter Pulse-Width Modulator (TCPWM) blocks
Center-aligned, Edge, and Pseudo-random modes
Comparator-based triggering of Kill signals for motor drive and other high-reliability digital
logic applications
Up to 36 programmable GPIOs
44-pin TQFP, 40-pin QFN, and 28-pin SSOP packages
Any GPIO pin can be CapSense, LCD, analog, or digital
Drive modes, strengths, and slew rates are programmable
PSoC Creator design environment
Integrated development environment (IDE) provides schematic design entry and build (with
analog and digital automatic routing)
EMPRESS
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 31
Hardware
Applications Programming Interface (API) component for all fixed-function and programmable
peripherals
Industry-standard tool compatibility
After schematic entry, development can be done with Arm-based industry-standard develop-
ment tools
For more information see the CY8C42 family datasheet.
4.3.2 PSoC 5LP
An onboard PSoC 5LP is used to program and debug PSoC 4. The PSoC 5LP connects to the USB
port of the PC through a USB Mini B connector and to the SWD interface of the PSoC 4 device.
PSoC 5LP is a true system-level solution providing MCU, memory, analog, and digital peripheral
functions in a single chip. The CY8C58LPxx family offers a modern method of signal acquisition,
signal processing, and control with high accuracy, high bandwidth, and high flexibility. Analog
capability spans the range from thermocouples (near DC voltages) to ultrasonic signals. For more
information, refer to the PSoC 5LP webpage.
Features
32-bit Arm Cortex-M3 CPU core
DC to 67-MHz operation
Flash program memory, up to 256 KB, 100,000 write cycles, 20-year retention, and multiple
security features
Up to 32-KB flash error correcting code (ECC) or configuration storage
Up to 64 KB SRAM
2-KB electrically erasable programmable read-only memory (EEPROM) memory, 1 M cycles,
and 20 years retention
24-channel direct memory access (DMA) with multilayer AHB bus access
a.Programmable chained descriptors and priorities
b.High bandwidth 32-bit transfer support
Low voltage, ultra low power
Wide operating voltage range: 0.5 V to 5.5 V
High-efficiency boost regulator from 0.5 V input to 1.8 V to 5.0 V output
3.1 mA at 6 MHz
Low power modes including:
a.2-µA sleep mode with real time clock (RTC) and low-voltage detect (LVD) interrupt
b.300-nA hibernate mode with RAM retention
Versatile I/O system
28 to 72 I/Os (62 GPIOs, 8 SIOs, 2 USBIOs)
Any GPIO to any digital or analog peripheral routability
LCD direct drive from any GPIO, up to 46×16 segments
CapSense support from any GPIO[3]
1.2 V to 5.5 V I/O interface voltages, up to 4 domains
Maskable, independent IRQ on any pin or port
Schmitt-trigger transistor-transistor logic (TTL) inputs
All GPIOs configurable as open drain high/low, pull-up/pull-down, High-Z, or strong output
Configurable GPIO pin state at power-on reset (POR)
25 mA sink on SIO
Digital peripherals
20 to 24 programmable logic device (PLD) based universal digital blocks (UDBs)
Full CAN 2.0b 16 RX, 8 TX buffers
Full-Speed (FS) USB 2.0 12 Mbps using internal oscillator
EMPRESS
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 32
Hardware
Four 16-bit configurable timers, counters, and PWM blocks
67-MHz, 24-bit fixed point digital filter block (DFB) to implement finite impulse response (FIR)
and infinite impulse response (IIR) filters
Library of standard peripherals
a.8-, 16-, 24-, and 32-bit timers, counters, and PWMs
b.Serial peripheral interface (SPI), universal asynchronous transmitter receiver (UART), and
I2C
c.Many others available in catalog
Library of advanced peripherals
a.Cyclic redundancy check (CRC)
b.Pseudo random sequence (PRS) generator
c.Local interconnect network (LIN) bus 2.0
d.Quadrature decoder
Analog peripherals (1.71 V VDDA 5.5 V)
1.024 V ±0.1% internal voltage reference across –40 °C to +85 °C
Configurable delta-sigma ADC with 8- to 20-bit resolution
Sample rates up to 192 ksps
Programmable gain stage: ×0.25 to ×16
12-bit mode, 192 ksps, 66-dB signal to noise and distortion ratio (SINAD), ±1-bit INL/DNL
16-bit mode, 48 ksps, 84-dB SINAD, ±2-bit INL, ±1-bit DNL
Up to two SAR ADCs, each 12-bit at 1 Msps
Four 8-bit 8 Msps current IDACs or 1-Msps voltage VDACs
Four comparators with 95-ns response time
Four uncommitted opamps with 25-mA drive capability
Four configurable multifunction analog blocks. Example configurations are programmable
gain amplifier (PGA), transimpedance amplifier (TIA), mixer, and sample and hold
CapSense support
Programming, debug, and trace
JTAG (4 wire), SWD (2 wire), single wire viewer (SWV), and TRACEPORT interfaces
Cortex-M3 flash patch and breakpoint (FPB) block
Cortex-M3 Embedded Trace Macrocell™ (ETM™) generates an instruction trace stream
Cortex-M3 data watchpoint and trace (DWT) generates data trace information
Cortex-M3 Instrumentation Trace Macrocell (ITM) can be used for printf-style debugging
DWT, ETM, and ITM blocks communicate with off-chip debug and trace systems via the SWV
or TRACEPORT
Bootloader programming supportable through I2C, SPI, UART, USB, and other interfaces
Precision, programmable clocking
3- to 62-MHz internal oscillator over full temperature and voltage range
4- to 25-MHz crystal oscillator for crystal PPM accuracy
Internal PLL clock generation up to 67 MHz
32.768-kHz watch crystal oscillator
Low-power internal oscillator at 1, 33, and 100 kHz
For more, see the CY8C58LPxx family datasheet.
CYPRESS mum m wunllnw m Mm human-1) Nazmczwvn (name-mu )sam "
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 33
Hardware
4.3.3 Power Supply System
The power supply system on this board is versatile, allowing the input supply to come from the
following sources:
5-V power from onboard USB programming header J10
5-V to 12-V power from Arduino shield using J1.1 header
VTARG - power from the onboard SWD programming using J6 or J7
VIN - J11
The PSoC 4 and PSoC 5LP are powered with either a 3.3 V or 5 V source. The selection between
3.3 V and 5 V is made through the J9 jumper. The board can supply 3.3 V and 5 V to the I/O headers
and receive 3.3 V from the I/O headers. The board can also be powered with an external power
supply through the VIN (J11) header; the allowed voltage range for the VIN is 5 V to 12 V. The LDO
regulator regulates the VIN down to 3.3 V. Figure 4-4 shows the power supply block diagram and
protection circuitry.
Note: The 5-V domain is directly powered by the USB (VBUS). For this reason, this domain is
unregulated.
Figure 4-4. Power Supply Block Diagram with Protection Circuits
I/OHeader
USB
5V Vin 3.3V
PSoC5LP
USB
5V
P4 10pin
Debug
P5LP I/O
Header
PTC
LDO
ESD
Protection
J9
P5LP 10pin
Debug
MOSFETbased
ProtectionCkt
PSoC4
{EMPRESS ' EMIEnnEn m munnnw
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 34
Hardware
4.3.3.1 Protection Circuit
The power supply rail has reverse-voltage, over-voltage, short circuits, and excess current protection
features, as seen in Figure 4-4.
The Schottky diode (D4) ensures power cannot be supplied to the 5-V domain of the board from
the I/O header.
The series protection diode (D2) ensures VIN (power supply from the I/O header) does not back
power the USB.
The Schottky diode (D11) ensures 3.3 V from I/O header does not back power the LDO.
The series protection diode (D13) ensures that the reverse-voltage cannot be supplied from the
VIN to the regulator input.
A PTC resettable fuse is connected to protect the computer's USB ports from shorts and over-
current.
The MOSFET-based protection circuit provides over-voltage and reverse-voltage protection to
the 3.3-V rail. The PMOS Q1 protects the board components from a reverse-voltage condition.
The PMOS Q2 protects the PSoC from an over-voltage condition. The PMOS Q2 will turn off
when a voltage greater than 4.2 V is applied, protecting the PSoC 4.
The output voltage of the LDO is adjusted such that it takes into account the voltage drop across
the Schottky diode and provides 3.3 V.
4.3.3.2 Procedure to Measure PSoC 4 Current Consumption
The following three methods are supported for measuring current consumption of the PSoC 4
device.
When the board is powered through the USB port (J10), remove jumper J13 and connect an
ammeter, as shown in Figure 4-5.
Figure 4-5. PSoC 4 Current Measurement when Powered from USB Port
When using a separate power supply for the PSoC 4 with USB powering (regulator output on the
USB supply must be within 0.5 V of the separate power supply).
Remove jumper J13. Connect the positive terminal of voltage supply to the positive terminal of
the ammeter and the negative terminal of the ammeter to the lower pin of J13. Figure 4-6
shows the required connections.
CYPRESS ' EMIEnnEn m munnnw R15. [(1 MI, 1133, RSI
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 35
Hardware
Figure 4-6. PSoC 4 Current Measurement when Powered Separately
When the PSoC 4 is powered separately and the PSoC 5LP is not powered, make these changes
to avoid leakage while measuring current:
Remove the zero-ohm resistors R24 and R25. Removing these resistors will affect the USB-
I2C functionality.
Remove R32, R33, and R34, which are meant for programming the PSoC 4. Removing these
resistors disables the PSoC 5LP capability for programming.
Connect an ammeter between pins 1 and 2 of header J13 to measure current.
Figure 4-7. Zero-ohm Resistor Position
4.3.4 Programming Interface
The kit allows programming and debugging of the PSoC 4 in two modes:
Using the Onboard PSoC 5LP Programmer and Debugger
Using CY8CKIT-002 MiniProg3 Programmer and Debugger
VOLTAGE
SOURCE
”CYPRESS mum w munuuw
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 36
Hardware
4.3.5 Arduino Compatible Headers (J1, J2, J3, J4, and J12 - unpopulated)
This kit has five Arduino compatible headers; J1, J2, J3, J4 and J12. You can develop applications
based on the Arduino shield’s hardware.
Figure 4-8. Arduino Header
The J1 header contains I/O pins for reset, internal reference voltage (IOREF), and power supply line.
The J2 header is an analog port. It contains I/O pins for SAR ADC, comparator, and opamp. The J3
header is primarily a digital port. It contains I/O pins for PWM, I2C, SPI, and analog reference. The
J4 header is also a digital port. It contains I/O pins for UART and PWM. The J12 header is an
Arduino ICSP compatible header for the SPI interface. This header is not populated. Refer to the “No
Load Components” section of A.6 Bill of Materials (BOM) on page 125 for the header part number.
Note: The PSoC 4 pin P0[0] is connected to both pin 13 of the J2 header and pin 5 of the J4 header.
Similarly, the PSoC 4 pin P1[0] is connected to both pin 17 of the J2 header and pin 7 of the J4
header. Therefore, when using P0[0] or P1[0] from either the J2 or J4 header, there should not be
any external signal connected to the other header.
CYPRESS mama m munnuw “’0 "LA Q‘QLJW‘M: 3x1 REC? Po 2 w VDD mm) Arduincv Campatlble Head
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 37
Hardware
Figure 4-9. Arduino Compatible Headers
4.3.5.1 Additional Functionality of Header J2
The J2 header is a 9×2 header that supports Arduino shields. The port 0, port 1, and port 2 pins of
PSoC 4 are brought to this header. The port 1 pins additionally connect to the onboard CapSense
slider through 560- resistors. When the CapSense feature is not used, remove these resistors to
ensure a better performance with these pins.
Arduino
Compatible
I/O Header (J3)
Arduino
Compatible
I/O Header (J4)
Arduino
Compatible
I/O Header (J1)
Arduino
Compatible
I/O Header (J2)
Arduino
Compatible ICSP
I/O Header (J12)
(J1-J4) Arduino Compatible Headers
I2C Pull up
Resistors
P2_0
P2_1
P2_2
P2_3
P2_4
P2_5
P0_0
P0_1
P0_2
P0_3
P1_5
P1_4
P1_3
P1_2
P0_5
P0_4
P0_7
P3_7
P0_0
P3_5
P1_0
P2_7
P2_6
P3_6
P3_4
P3_0
P3_1
P0_6
P1_7
P4_1
P4_0
/XRES
V3.3_EXT
IOREF
P1_1P1_0
P4_VDD
VBUS
P4_VDD
VIN
P4_VDD J4
8x1 RECP
1
2
3
4
5
6
7
8
0603
R9
2.2K
SOD123
D4
J2
9x2 RECP
1 2
3 4
5 6
7 8
910
11 12
13 14
15 16
17 18
TVS4
18V 350W BI
J1
8x1 RECP
1
2
3
4
5
6
7
8
J3
10X1 RECP
1
2
3
4
5
6
7
8
9
10
0603
R8
2.2K
NO LOAD
P3_1
P0_6
/XRES
P3_0
P4_VDD
J12
3x2 RECPT
1 2
3 4
5 6
@cYPREss
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 38
Hardware
4.3.5.2 Functionality of Unpopulated Header J12
The J12 header is a 2×3 header that supports Arduino shields. This header is used on a small
subset of shields and is unpopulated on the PSoC 4 Pioneer Kit. Note that the J12 header only
functions in 5.0 V mode. To ensure proper shield functionality, ensure the power jumper is connected
in 5.0 V mode.
4.3.6 Digilent Pmod Compatible Header (J5 - unpopulated)
This port supports Digilent Pmod peripheral modules. Pmods are small I/O interfaces, which connect
with the embedded control boards through either 6- or 12-pin connectors. The PSoC Pioneer Kit
supports the 6-pin Pmod type 2 (SPI) interface. For Digilent Pmod cards, go to www.digilentinc.com.
This header is not populated on the PSoC 4 Pioneer Kit. You must populate this header before
connecting the Pmod daughter cards. Refer to the “No Load Components” section of A.6 Bill of
Materials (BOM) on page 125 for the header part number.
Figure 4-10. Pmod Connection
CYPRESS nigilemQ Pmodm Compatible l/O Header us) no Header (J8) TH“ n n > no J5 Digllent Cumpatlble |: I: Psac 5m: GPIO
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 39
Hardware
Figure 4-11. Digilent Pmod Interface
See A.2 Pin Assignment Table on page 120 for details on the pin descriptions for the J5 header.
4.3.7 PSoC 5LP GPIO Header (J8)
A limited set of PSoC 5LP pins are brought to this header. Refer to 6.3 Developing Applications for
PSoC 5LP on page 88 for details on how to develop custom applications. See A.2 Pin Assignment
Table on page 120 for pin details.
Figure 4-12. PSoC 5LP GPIO Header (J8)
J5 Digilent PMOD Cards
Compatible Headers
NO LOAD
P3_5
P3_0
P3_1
P0_6
P4_VDD
J5
6X1 CONN FEMALE
1
2
3
4
5
6
PSoC 5LP GPIO Extension Header
P5LP0_0
P5LP1_2
P5LP3_5P5LP3_4
P5LP3_0
P5LP0_1
P5LP3_6 P5LP3_7
P5LP12_7P5LP12_6
P5LP_VDD
J8
6x2 RECPT
1 2
3 4
5 6
7 8
109
1211
‘CYPRESS' mama m munnuw CapSense® Shder g” g2 swam
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 40
Hardware
4.3.8 CapSense Slider
The kit has a five-segment linear capacitive touch slider on the board, which is connected to pins
P1[1] to P1[5] of the PSoC 4 device.
The modulation capacitor (Cmod) is connected to pin P4[2] and an optional bleeder resistor (R1) can
be connected across the Cmod. This board supports CapSense designs that enable waterproofing.
The waterproofing design uses a concept called shield, which is a conductor placed around the
sensors. This shield must be connected to a designated shield pin on the device to function. The
shield must be connected to the ground when not used. On the PSoC 4 Pioneer Kit, the connection
of the shield to the pin or to the ground is made by resistors R44 and R45, respectively. By default,
R45 is mounted on the board, which connects the shield to the ground. Populate R44 when
evaluating waterproofing designs, which will connect the shield to the designated pin, P0[1]. This
shield is different from the Arduino shields, which are boards that connect over the Arduino header.
Refer to the CapSense Design Guide for further details related to CapSense.
Figure 4-13. CapSense Slider
Figure 4-14. CapSense Slider Connection
P1_1
P1_2
P1_3
P1_4
P1_5
R17
560 ohm
R20
560 ohm
R21
560 ohm
R19
560 ohm
CSS1
CapSense Slider 5 Seg
1
2
3
4
5
R18
560 ohm
Shunt
Resistor
CAPSENSE TUNING CIRCUITRY
Default Loaded For CSD
NO LOAD
Shield Setting
P4_2
ShieldP0_1
0603
R45 ZERO
C1
2200 pF
0603
R44 ZERO
R1
NO LOAD
CYPRESS EMIEDDED m rmmw Programmer RGE LED F16 F02 PLVDD P0 3 % RGB LED
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 41
Hardware
4.3.9 Pioneer Board LEDs
The PSoC 4 Pioneer board has three LEDs. A green LED (D10) indicates the status of the
programmer. See A.5 Error in Firmware/Status Indication in Status LED for a detailed list of LED
indications. An amber LED (D3) indicates status of power supplied to the board. The kit also has a
general-purpose tricolor LED (D9) for user applications that connect to specific PSoC 4 pins.
Figure 4-15 shows the indication of all these LEDs on the board. Figure 4-16 and Figure 4-17 detail
the LED schematic.
Figure 4-15. Pioneer Kit LEDs
Figure 4-16. Status LED and Power LED
Figure 4-17. RGB LED
P5LP3_1
P5LP_VDD
0805
R31
330 ohm
0805
D10
Status LED Green
2 1
VDD
R3 560 ohm
0805
D3
Power LED
2 1
P0_2
P0_3
P1_6
P4_VDD
RG
B
D9
RGB LED
1
2 3
4
R29 1.5K
R30 1.5K
R28 2.2K
CYPRESS mama m munnuw EA? —0/ EV USER BUTTON PSaC 4 Raset Button
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 42
Hardware
4.3.10 Push Buttons
The kit contains a Reset push button and a User push button, as shown in Figure 4-18.
The Reset button is connected to the XRES pin of PSoC 4 and is used to reset the onboard PSoC 4
device. The User button is connected to P0[7] of PSoC 4 device. Both the push buttons connect to
ground on activation (active low).
Figure 4-18. Push Buttons
Note: The PSoC 4 Reset pin (XRES) has an internal pull-up resistor. However, an external pull-up
resistor R10 is connected to the PSoC 4 Reset pin on the kit, which is optional and required only in a
noisy system.
USER BUTTON
RESET
/XRES
P0_7
SW2
EVQ-PE105K
1 2
SW1
EVQ-PE105K
1 2
_9
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 43
5. Code Examples
The code examples described in this chapter introduce the functionality of the PSoC 4 device and
the onboard components. To access the examples, download the CD ISO image or setup files from
the kit webpage. After installation, the code examples will be available from Start > Kits on the
PSoC Creator Start Page. For a list of all code examples available with PSoC Creator visit PSoC 3/
PSoC 4/PSoC 5LP Code Examples webpage.
5.1 Using the Kit Code Examples
Follow these steps to open and program code examples:
1. Launch PSoC Creator from Start > All Programs > Cypress > PSoC Creator<version> >
PSoC Creator <version>.
2. On the Start page, click CY8CKIT-042 under Start > Kits. A list of code examples appears, as
shown in Figure 5-1.
Figure 5-1. Open Code Example from PSoC Creator
3. Build the code example by choosing Build > Build <Project name>. After the build process is
successful, a .hex file is generated.
CYPRESS mam m vnununw me {an mew EVcJeCL 5mm Debug Icol: WIMOW new " a Build 5mm LED snimns . I a n9 , g . «u g «3 a i , a Clean Bllnhng LED Icwsansa Wfiplmu E4 Clean and Build Eunkmg LED E1 P : Q!— ;. (n Wukspaoe Ehnkm LED‘ [1 P a El (n 3’; 373332333” .5 Genevate Appnmon He Has-fierFfles (2] Generate ijed Datasheel m1 am In a a a Samoa We: a W H mm , fl m file gun Mew 2.51m gum: erug ols ndow Eufiiafiag Ar) wmaaws >_ Vaa gnfi a «3 a; , fl 4 Erogmm Cums ~10 Wolhpaue Explain u pmpuy i Select DEbIIg Iarget. mfinmn 6%! 1 erug F5 Wukspwe ‘EhnkmgLED‘ a Funeds) mil #2me 13mm] LEV [W fl Denug mama"! Progvammlng AIUFS Lfi' rupDeswncyach fl Attad‘to Running Target As BhnkmgLED cydm uh HemerFHes I Togg‘e Bleakpaml F9 x11 dame n ’ 9a Semeems "W ”“90"“ g mama J 1:“ 731 m a: Genevaledjmme E a psm J F E Chick —|—fiq—"—'— sum Dean, 1319:!
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 44
Code Examples
Figure 5-2. Build Code Example from PSoC Creator
4. To program, connect the PSoC 4 Pioneer Kit to the computer using the USB cable connected to
port J10, as described in section 3.2 Programming and Debugging PSoC 4 on page 19. The
board is detected as KitProg.
5. Choose Debug > Program in PSoC Creator.
Figure 5-3. Program Device from PSoC Creator
6. If the device is yet to be acquired, the Select Debug Target window will appear. Select KitProg/
<serial_number> and click Port Acquire, as shown in Figure 5-4.
Figure 5-4. Acquire Device from PSoC Creator
CYPRESS mum-1mm vnununw Selezl Debug Target as KangnmlnEm mam m4umum) aim-m MBBIMW cypmn muss Selezl Debug Target as Knpw‘mmgm
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 45
Code Examples
7. After the device is acquired, it is shown in a tree structure below the KitProg/<serial_number>.
Now, click the Connect button.
Figure 5-5. Connect Device from PSoC Creator
8. Click OK to exit the window and start programming.
Figure 5-6. Program Device from PSoC Creator
CYPRESS mum m xnunllnw Canngumlm Debug (Ame) V Todchain ARM sec 5 Holsqz-upaale V E OBCKlLoMjensoLHun v com-mm me m Code Generauon Clmam Flag: viii-F3 Debug 1 . » Fl ARM GCC 5‘4-2016-qZ-upda General Assembly Fl Compller General Opfimlzauon l H. l l m User Commands Oslo!" h Allows you n: ems! a cualnm command llne lay me Compile! loal WMlaMSol-mpw mgmmiy ucml—‘uunqoneaue -w.| mm mm 05 M3
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 46
Code Examples
5.2 Using the Micrium® µC/Probe® Projects
The Micrium µC/Probe is a revolutionary software development tool that incorporates Micrium's pro-
prietary Graphical Live Watch to graphically visualize the internals of any embedded system. With
the µC/Probe, you can test your embedded design effortlessly, with a few mouse clicks. Cypress
provides pre-designed µC/Probe project (workspace) files for CapSense and PWM code examples
associated with the CY8CKIT-042 kit. These projects can be found in the kit installation directory in
the following folder:
<Install_Directory>\Cypress\CY8CKIT-042 PSoC 4 Pioneer Kit\1.0\uCProbe
Refer to section 6.5 Using µC/Probe Tool on page 107 for more details on how to use the Micrium
µC/Probe. To learn more about the µC/Probe, visit: micrium.com/tools/ucprobe/overview.
Note: To use the µC/Probe with PSoC Creator 4.2, the '-gdwarf-3' command line parameter should
be added in the code example under Build Settings, as shown in Figure 5-7.
Figure 5-7. Project Settings – Compiler Command Line Parameter
CYPRESS mum m Inunluw P4_VDD van T g x i m. a PWM v; — :3 av 43 3 [3— count un 5 ml III—— 8'8“ 0c a : g - _. line —v-E|P'—"*§I_“_e.'-_EP_ _ _ _ _ _ _ _! Iin9_n a Clock|:|— clock "”"1 interrupt a
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 47
Code Examples
5.3 Blinking LED
5.3.1 Project Description
This code example uses a pulse-width modulator (PWM) to illuminate the RGB LED. The PWM out-
put is connected to pin P0_3 (blue) of the RGB LED. The frequency of blinking is set to 1 Hz with a
duty cycle of 50 percent. The blinking frequency and duty cycle can be varied by varying the period
and compare value respectively.
Note: The PSoC 4 Pioneer Kit is factory-programmed with this example.
Figure 5-8. PSoC Creator Schematic Design of Blinking LED Project
5.3.2 Hardware Connections
No specific hardware connections are required for this example because all connections are hard-
wired on the board. Open Blinking LED.cydwr in the Workspace Explorer and select the suitable pin.
Figure 5-9. Pin Selection for Blinking LED Project
Table 5-1. Pin Connection
Pin Name Port Name
Pin_BlueLED P0_3 (Blue)
CYPRESS mum-1mm wunllnw Sta rt Initialize and start the PWM component w~w~~.w~v_ til- um: FWM‘ Iefl aligned me
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 48
Code Examples
5.3.3 Flow Chart
Figure 5-10 shows the flow chart of code implemented in main.c.
Figure 5-10. Blinking LED Code Example Flow Chart
5.3.4 Verify Output
Build and program the code example onto the device. Observe the frequency and duty cycle of the
blinking LED. Change the period and compare value in the PWM component, as shown in
Figure 5-11. Rebuild and reprogram the device to vary the frequency and duty cycle.
Figure 5-11. PWM Component Configuration Window
CYPRESS ' :n-mmmumuw PVVM Red m £1 m—oaum un +3 ‘11—. sun cc a linlJl {J DIM irIHNP‘ E] PWM Green m a m—wunl un +3 ‘37 sun ac a line um,“ {I 5:969:me elm mm Inanum n PWM B‘ue £1 m—mm un Ik— san cc nne ulna IlneJ +3 R—ilaj-d tum Adam-,GIl-‘LEDfiI-t/ Raslsn-tjlua LEDJW
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 49
Code Examples
5.4 PWM
5.4.1 Project Description
This code example demonstrates the use of the PWM component. The project uses three PWM out-
puts to set the color of RGB LED on the Pioneer Kit. The LED cycles through seven colors – violet >
indigo > blue > green > yellow > orange > red (VIBGYOR). Each color is maintained for a duration of
one second. The different colors are achieved by changing the pulse width of the PWMs.
Figure 5-12. PSoC Creator Schematic Design of PWM Code Example
5.4.2 Hardware Connections
No specific hardware connections are required for this code example because all connections are
hard-wired on the board. Open PWM.cydwr in the Workspace Explorer and select the suitable pins.
Figure 5-13. Pin Selection for PWM Project
Table 5-2. Pin Connections
Pin Name Port Name
Pin_RedLED P1_6 (Red)
Pin_GreenLED P0_2 (Green)
Pin_BlueLED P0_3 (Blue)
CYPRESS ' mum in munllnw Start V Iniiialize ihe colormap for VIEGVOR V Initialize and start the PWM components —> V Wait for one second V Sel the PWM widths Io get next color in the color map
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 50
Code Examples
5.4.3 Flow Chart
Figure 5-14 shows the flow chart of code implemented in main.c.
Figure 5-14. PWM Code Example Flow Chart
5.4.4 Verify Output
Build and program the code example, and reset the device. Observe the RGB LED cycles through
the following color pattern:
violet > indigo > blue > green > yellow > orange > red (VIBGYOR)
"JCYPRESS' ' Enmninm wuouw ,.._/_ ....... J7 Vss swz P|n_WakeUpSwlmh Er in: isr_WakeUp PLVDD Rama RED 2.2K +<-w——|§ ed_r‘i(="" pi="" r="" led="" wfié="" _________="">
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 51
Code Examples
5.5 Deep Sleep
5.5.1 Project Description
This code example demonstrates the low-power functionality of the PSoC 4. The LED is turned on
for one second to indicate Active mode; then, the device enters Deep-Sleep mode. When switch
SW2 is pressed, the device wakes up and the LED is turned on for one second and then goes back
into Deep-Sleep mode.
Figure 5-15. PSoC Creator Schematic Design of Deep-Sleep Project
5.5.2 Hardware Connections
No extra connections are required for the code example functionality because the connections are
hard-wired onto the board. To make low-power measurements using this project, refer to the use
case detailed in section 4.3.3.2 Procedure to Measure PSoC 4 Current Consumption on page 34.
Open Deep Sleep.cydwr in the Workspace Explorer and select the suitable pin.
Table 5-3. Pin Connection
Figure 5-16. Pin Selection for Deep-Sleep Project
Note that the Debug (SWD) port is disabled in the example to reduce power consumption during
Deep-Sleep power mode. The Debug port can be enabled by setting the Debug Select option to
SWD in the System tab of the .cydwr file, as shown in Figure 5-17. Disabling the debug port dis-
ables the ability to debug the code example through SWD.
Pin Name Port Name
Pin_RedLED P1_6 (Red)
Pin_WakeUpSwitch P0_7
:CYPRESS' Emu nzsn w m- arm Huang: rmmnW/m v 4 I) x 9 an \ 33 hpmd \ ‘5 mi.“ cum Lanfigumlmn umacmngmmmae unused Banded Io HEHDSIEUMEQ mks-mum: yum! cuss am mm“: mm mm VIM! cumpmssea mm mm... mama ammo ngmmmngmehuggm! WDhm I. may) 0,,“ . amp mm.“ Openlmg (budmuns vum M vmw M mm min so so Emm‘: mahuqmmm mumhrdmflgng » swn New m. «mm mm mm mm banana”! and: » Gmo “4.45m: umumhumww Imam! we Whm .«q 5mm. dwmmn ml in mm m swuand mmm m humanism Furmr: Mm “In: dam; “was V 1mm My”: «mm {mm
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 52
Code Examples
Figure 5-17. Enable Debug Select
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 53
Code Examples
5.5.3 Flow Chart
Figure 5-18 shows the flow chart of code implemented in main.c.
Figure 5-18. Deep-Sleep Project Flow Chart
5.5.4 Verify Output
Build and program the code example, and reset the device. LED is on for one second and turns off,
which indicates that the device has entered Deep-Sleep mode. Press SW2 switch to wake up the
device from Deep-Sleep mode and enter Active mode. The device goes back to Deep-Sleep mode
after one second.
Note: When the device is in Deep-Sleep mode, the programmer must reacquire the device before
programming can start.
Start
Turn LED on
for one second
Enter Deep-
Sleep mode
Interrupt on
SW2 press
Clear the
interrupt
CYPRESS ' mum mnumnw c- .. Ema:
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 54
Code Examples
5.6 CapSense
This code example can be executed in two ways with and without CapSense tuning. The same
project can be used to demonstrate the CapSense functionality as well as CapSense tuning using
the Tuner Helper GUI in PSoC Creator. This is done by commenting and uncommenting the line
#define ENABLE_TUNER in the main.c file of the code example. PSoC Creator does not compile
the code under the #ifdef (if defined) statement when the #define statement is commented (/
*…… */ or //). Similarly, when the #define statement is uncommented, the code required for work-
ing with Tuner GUI is compiled. By default, the project is set to work without CapSense tuning by
commenting the #define.
5.6.1 CapSense (Without Tuning)
5.6.1.1 Project Description
This code example demonstrates CapSense on PSoC 4. The example uses the five-segment
CapSense slider on the board. Each capacitive sensor on the slider is scanned using Cypress’s
CapSense Sigma Delta (CSD) algorithm implemented in the CapSense component. This project is
pre-tuned to take care of the board parasitics. For more information on the CapSense component
and CapSense tuning, see the CapSense component datasheet in PSoC Creator.
In this code example, the brightness of the green and red LEDs are varied, based on the position of
the user’s finger on the CapSense slider.
Figure 5-19. PSoC Creator Schematic Design of CapSense Code Example
Note: The EzI2C component is not used when tuning is disabled.
A Di CYPR§§§' ' zmnnmm Port Name
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 55
Code Examples
5.6.1.2 Hardware Connections
No specific hardware connections are required for this code example because all connections are
hard-wired on the board. Open CapSense.cydwr in the Workspace Explorer and select the suitable
pins.
Note: The I2C communication lines are not used when tuning is disabled.
Figure 5-20. Pin Selection for CapSense Code Example
Table 5-4. Pin Connection
Pin Name Port Name
CapSense:Cmod P4_2
CapSense:Sns[0] P1_1
CapSense:Sns[1] P1_2
CapSense:Sns[2] P1_3
CapSense:Sns[3] P1_4
CapSense:Sns[4] P1_5
Pin_GreenLED P0_2 (Green)
Pin_RedLED P1_6 (Red)
EZI2C_1:scl P3_0 (SCL)
EZI2C_1:sda P3_1 (SDA)
CYPRESS mum-1mm wunllnw Initialize and start the PWM and CapSense components —~L Scan the CapSense slidaf V Gel the finger position on me slider V Sel Ihe P'WM oulpul width to adjust the brighlness of the RGB LED —l
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 56
Code Examples
5.6.1.3 Flow Chart
Figure 5-21 shows the flow chart of code implemented in main.c.
Figure 5-21. CapSense Project Flow Chart
5.6.1.4 Verify Output
The brightness of the green and red LEDs are varied based on the position of the user’s finger on
the CapSense slider. When the finger is on segment 5 (P1[5]) of the slider, the green LED is brighter
than the red LED; when the finger is on segment 1 (P1[1]) of the slider, the red LED is brighter than
the green LED.
EMPRESS
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 57
Code Examples
5.6.2 CapSense (With Tuning)
5.6.2.1 Project Description
This code example demonstrates CapSense tuning on PSoC 4 using the "Tuner" to monitor
CapSense outputs. The CapSense outputs such as rawcounts, baseline, and signal (difference
count) can be monitored on the Tuner GUI. The project uses the auto-tuning feature, which sets all
CapSense parameters to the optimum values automatically. The parameter settings can be moni-
tored in the GUI but cannot be altered. In the manual tuning method, parameter settings can be
changed in the GUI and the resulting output can be seen.
The code example uses the five-segment CapSense slider on the board. Each capacitive sensor on
the slider is scanned using Cypress's CapSense Sigma Delta (CSD) algorithm implemented in the
CapSense component. The code uses tuner APIs. The tuner API CapSense_TunerComm() is used
in the main loop to scan sensors, which also sends the CapSense variables RawCounts, Baseline,
and Difference Counts (Signal) to the PC GUI through I2C communication.
In this example, the brightness of the green and red LEDs are varied, based on the position of the
user's finger on the CapSense slider.
See Figure 5-19 for the project schematic.
5.6.2.2 Hardware Connections
No specific hardware connections are required for this code example because all connections are
hard-wired on the board. Open CapSense.cydwr in the Workspace Explorer and select the suitable
pins.
See Tab l e 5 -4 and Figure 5-20 for the CapSense project pin connections.
”CYPRESS mum m voununw n o a 3% Sol-'DeFilu a - £1 main: E a
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 58
Code Examples
5.6.2.3 Flow Chart
Figure 5-22. CapSense with Tuning Flow Chart
5.6.2.4 Launching Tuner GUI
The Tuner GUI from PSoC Creator should be up and running for the code example to work. To
launch the GUI follow these steps:
1. Go to the project's TopDesign.cysch file.
Figure 5-23. Top Design File
2. To open the tuner, right-click on the CapSense_CSD component in PSoC Creator and click
Launch Tuner.
Start
Initialise and start the
PWM and CapSense
Tuner
Start Tuner
communication
Get the finger position on
the slider
Set the PWM output width to
adjust the brightness of the
RGB LED
:CYPRESS' mama: m munllnw a was» me: no a- _ ()me find Eumpk Imam" 0pm Can-man we, P159: [is] I
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 59
Code Examples
Figure 5-24. Launch Tuner
CYPRESS ' EMIEnnEn mwununw Cnmmnitations PM(COM1) - UART Kikng USB»UAKT (COMB) < uart="" 0k="" (and="" w="" mot-hm="" eadie-l="" s="" (nmnmnkafionst(coml)-uart="" 5.5.3”.="" mvmg="" uqukt="" (coma)="" ,="" uart="" m="" 5”,,="" o="" "i":="" 1?)="" 4mm:="" 0="" want="" pun="" nun-am="" n="" knocks"="" 2.13="" "="" 50km="">
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 60
Code Examples
3. The Tuner GUI opens. Click Configuration to open the configuration window.
Figure 5-25. Tuner GUI
4. Set the I2C communication parameters, as shown in the following figure.
Figure 5-26. I2C Communication
5. Click OK to apply the settings.
CYPRESS mum m wunllnw 5: [M 9m; um 1m I‘M @usmv“ mpm‘wwmm5 J “'"u mu" “m m“ Sump-uni wax thw‘ W v um m w... Ts; \ m / / 2..., .3. Eng-v mréhdd 1W "mm.“m s. .. mmm 2‘ WWW 2n wamm . WWW“. 2 Hwn-amdw) 83 mm“ u gamma“ mm mm, mm mm... m». . lam-Inh- _s.,_. \osdpmh fimyncunesl
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 61
Code Examples
5.6.2.5 Verify Output
1. To start the scanning and communication process, click Start.
Figure 5-27. Start Communication
CYPRESS mama m wununw a: y... M mm 1.15 m "an: W Sun may, “a WWW . hm (Imbmkmmm Scum wax J medgmkayam‘ W v um u -‘ um“: 35 m / 2w .9. M m m. H 9n :1 “mm a (WWW 2n swam” . Mmdmmd‘ 2 Hmmmmm as WWW u gamma“ mm mm, mac}: n... amp... _s.,.¢ .smqoadwi. nm‘mm:
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 62
Code Examples
2. Select a sensor in the Tuning tab. A red outline is seen on the selected sensor. Different
CapSense parameters are shown in Sensor Properties tab on the bottom-right. You cannot edit
the settings because auto-tuning is used in this project; auto-tuning automatically sets all the
parameters. Touch the selected sensor and observe the response in the tuner window.
Note: The board is designed according to layout guidelines for CapSense (best practices) for
1.5-mm overlay. Therefore, it is recommended that an overlay (not shipped with the kit) be used
while using the CapSense code example with tuning.
Figure 5-28. Sensor Tuning
3. In the Graphing tab, the CapSense results: Raw counts, Baseline, Signal (difference count) and
On/Off status for each sensor are represented as a graph. Click the Graphing Properties tab on
the bottom-right to select the slider element for which the CapSense results are to be shown in
the Graphing tab.
.‘p‘CYPREss mum-1mm vnunllnw mammnmwhwgm ul-gnflhdklnfinflllsam B: In pan-g v.54“ 1.15 u, m flaw ficommmq I Inm‘ "Rmpmm 5n mu 15a znn zsn sun 5.x. upws‘mpmiz wmflncmma
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 63
Code Examples
4. Select the sensor parameters to observe, as shown in the following figure. The graph of the
selected parameters is shown.
Figure 5-29. Sensor Parameter Graph
CYPRESS ' mmm mwunllnw El: Lfilw nan-g um". 1.15 “A, sum ‘fls-p ‘ Emmmm ‘ n In,” rm V , ham Hum 16,5410 16mm A A A A A A 15,54» - A A - A - 15,000 A A A A . A _ "Am A A A A . A u,m A A A A A A mm A A . A A A 13,000 A A A . A 12,5m A A A . 12,000 A A A A A A 11.54» - A A - A - 11,000 A A A . 10,5410 A A A . In,nnn A A A A A A 9,5“ . A A . A . 29., . . A . Z... . A A . A . zzn A , A A A A 200 A , A A A A m _ m A A . . E m . A A . A . .E m. A , _ _ "I Inn A A . . m A . . a. . . . u. . A A . A . 1n A , A A A A n 0 Sn ma 15a 200 25a Sun 35a Ann O50 _s...,. “flus‘hdmgz um)\.zcma
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 64
Code Examples
5. Touch a sensor or slider element and see the increase in raw counts.
Figure 5-30. Raw Count Increase
cm ijm - cvscnnuz (959“an Emil-Mailman Dwuhwdmiw‘iriy‘wm Banana! Tagafl [mwwswm T-gdmu g Tin-dum- CYPRESS' EMBEDDED m rnxnnnnw‘
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 65
6. Advanced Topics
6.1 Using PSoC 5LP as a USB-UART Bridge
The PSoC 5LP serves as a USB-UART bridge, which can communicate with the COM terminal
software. This section explains how to create a PSoC 4 code example to communicate with the
COM terminal software. This project is available with other code examples for the PSoC 4 Pioneer
Kit at the element14 webpage, 100 Projects in 100 days.
Users who have a Windows operating system that does not have HyperTerminal can use an
alternate terminal software such as PuTTY.
1. Create a new CY8CKIT-042 (PSoC 4200) Kit project in PSoC Creator, as shown in the following
figures. Select a specific location for your project and name the project as desired. You must
select the appropriate target hardware (kit) for this project. Ensure that the Select project tem-
plate option is set to ‘Empty schematic’. This example uses PSoC 4200 as the target device and
CY8CKIT-042 as the target board.
Figure 6-1. Select Project Type
CYPRESS mama m wunllnw Salaam-qua MiMWwflmWrflhihw-zwm .WM memfimhfllfll’Jlxllcl Emma: Wiflmmwhmmmhmdflw ammo-mm— 0mm Mamwmhww Vlulq— r-Ir WI lam: W E Mil-I' “31ml
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 66
Advanced Topics
Figure 6-2. Select Empty Schematic Option
Figure 6-3. Create Project
CYPRESS EMIEnnin m wunllnw , [5 w mmuukmun thkGCm Mo] 3- mmypmuumm » m Wm'ransnilUMYlvlfim HART [v2.50] 1:ng mum
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 67
Advanced Topics
2. Drag and drop a UART (SCB) component to the top design.
Figure 6-4. UART Component Under Component Catalog
3. To configure the UART, double-click or right-click on the UART component and select Configure.
Figure 6-5. Open UART Configuration Window
4. Change the component name from UART_1 to UART.
CYPRESS mum m munllnw [flan-«mm Ila-ul- Tasmania Tun-mum “*0“th Thaw-swam
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 68
Advanced Topics
5. Configure the UART as shown in the following figures.
Figure 6-6. UART Configuration Window
Figure 6-7. UART Basic Configuration Window
CYPRESS ' EHIEnninmwunluw rut-u: saucy; lh—WRI my..- mm.! a El mm,“ x El E1 mm \mmmmm D mm... H Ixnmn-Au u Ixnmmm I] 0(an fl mam-mm fl mum D mmx D rxnmlaa Hm cm. mm D :7 L1 luau—unma- Ms, 79d lz:fi ”mm r: a RIM :uflm m m on... Dan-m on“: Dun-u: 0am: D Rxnmm-w u Rxnmm u mmm D nxnmum H mm" H films" D mm.“ BMW mm yui rum mama» F unnum- mm... D mun-amen: mm mm 2m, :mm:~ mnmm mm 2m :mmjv a» E!
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 69
Advanced Topics
Figure 6-8. UART Advanced Configuration Window
6. Click Apply and then OK to save the changes made to UART configuration.
7. Select P0[4] for UART RX and P0[5] for UART TX in the Pins tab of <Project.cydwr>.
Figure 6-9. Pin Selection
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 70
Advanced Topics
8. Place the following code in your main.c project file. The code will echo any UART data received.
int main()
{
uint8 ch;
/* Start SCB UART TX+RX operation */
UART_Start();
/* Transmit String through UART TX Line */
UART_UartPutString("CY8CKIT-042 USB-UART");
for(;;)
{
/* Get received character or zero if nothing has been received yet
*/
ch = UART_UartGetChar();
if(0u != ch)
{
/* Send the data through UART. This functions is blocking and waits until
there is an entry into the TX FIFO. */
UART_UartPutChar(ch);
}
}
}
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 71
Advanced Topics
9. Build the project by clicking Build > Build {Project Name} or [Shift] + [F6]. After the project is
built without errors and warnings, program (by clicking Debug > Program) the project to PSoC 4
through the PSoC 5LP USB programmer or MiniProg3.
Connect the RX line of the PSoC 4 to J8.10 and TX line of the PSoC 4 to J8.9, as shown in the
following figures.
Figure 6-10. UART Connection Between PSoC 4 and PSoC 5LP
Figure 6-11. Block Diagram of UART Connection Between PSoC 4 and PSoC 5LP
Note: UART RX and UART TX can be routed to any digital pin on PSoC 4 based on the configura-
tion of the UART component. An SCB implementation of UART will route the RX and TX pins to
either one of the following subsets: (P0[4], P0[5]) or (P3[0],P3[1]) or (P4[0],P4[1]).
PSoC 5LP PSoC 4
USB
Mini B
P0[4]
UART RX
P0[5]
UART TX
D+
D-
P15[6]
P15[7]
J8.10J8.9
P12[7]
UART TX
P12[6]
UART RX
CYPRESS mum in launllnw ‘DeviaeManager Eile Anion Kiev! HEW «MEIIEW » it Compuler } u Disk drives > !i Display adapters , £5 DVDICDVRDM drivs > 03 Human lmedace Devices r q IDE ATNATAPI controllers ) 3 IEEE 1394 Bus host cmmullers } a Imaging devices .2 Keyboards ) .] Mice and omer poirning devices > a Monitols A Q Neiworkzdapiers g, cm Systems vm Adaprer lured—bit Windows ‘ :3 1mm!) 82579LM Gigalm Neiworlr Connection i5 mm Cemrrrrom) Advanced" 6205 ‘ I: Microsolr inmral WiFi Minipon Adapter 4 Mb omer devices 1h Unknown device a W’ Pons (COM er LPTl w [Mel " We Malia ent Technology * SOL (COM3) KnProg US ART (COMIZ » W Security Devices ) Ir SM Driver > 9 Sound, video and game controllers , C— srorzge commllers } A Synem devioes > 3 Universal Serial Bus coniroilers
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 72
Advanced Topics
To communicate with the PSoC 4 from the terminal software, follow this procedure:
1. Connect USB Mini B to J10. The kit enumerates as a KitProg USB-UART and is available under
the Device Manager, Ports (COM & LPT). A communication port is assigned to the
KitProg USB-UART.
Figure 6-12. KitProg USB-UART in Device Manager
CYPRESS mum-1mm munllnw Common Des/mpfim mum-mam “:0anth Elm USB‘UART oommunim‘orl mmnmmmu—m smwmmmmhmh HostLhn-(o-Padmss) Bun 22 '75s" Lou-mmm-mmm SINGS m Dumas-mag:
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 73
Advanced Topics
2. Open HyperTerminal and select File > New Connection and enter a name for the new connec-
tion and click OK.
For PuTTY, double-click the putty icon and select Serial under Connection.
Figure 6-13. Open New Connection
HyperTerminal
PuTTY
CYPRESS mama: m munllnw 15m! mun-inim- Eulerdeukhmepm mmywnlbcid
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 74
Advanced Topics
3. A new window opens, where the communication port can be selected.
In HyperTerminal, select COMX (or the specific communication port that is assigned to KitProg
USB-UART) in Connect using and click OK.
In PuTTY enter the COMX in Serial line to connect to.
This code example uses COM12.
Figure 6-14. Select Communication Port
HyperTerminal
PuTTY
CYPRESS mum m voununw
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 75
Advanced Topics
4. In HyperTerminal, select 'Bits per second', 'Data bits', 'Parity', 'Stop bits', and 'Flow control' under
Port Settings and click OK.
Make sure that the settings are identical to the UART settings configured for PSoC 4.
In PuTTY select 'Speed (baud)', 'Data bits', 'Stop bits', 'Parity' and 'Flow control' under Configure
the serial line. Click Session and select Serial under Connection type.
Serial line shows the communication port (COM12) and Speed shows the baud rate selected.
Click Open to start the communication.
Figure 6-15. Configure the Communication Port
HyperTerminal
PuTTY
:CYPRESS' mum m voununw am“;— “mummmm wmmmmhmm Saab: Sneed 009m 96m Cumin»; Om 04m Ow ogsn Smldllmumlsvnllliwhods mm line beds to manning he an: Eons Incomilg dun h 7-biASUI fllip In: an modhlmnllvfllh Ill-
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 76
Advanced Topics
Figure 6-16. Select Communication Type in PuTTY
5. Enable Echo typed characters locally under File > Properties > Settings > ASCII Setup, to
display the typed characters on HyperTerminal. In PuTTY, enable the Force on under Terminal >
Line discipline options to display the typed characters on the PuTTY.
Figure 6-17. Enabling Echo of Typed Characters in HyperTerminal
CYPRESS mmm m voununw , gn 1mm: Hep D." 1113 Di E CVBCKIFO‘Z USBiURRT PPSSooCC_ mmedm Modern-cl 960087er SCROLL CPS NUM (Epiure Prntarffl
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 77
Advanced Topics
Figure 6-18. Enabling Echo of Typed Characters in PuTTY
6. The COM terminal software displays both the typed data and the looped back data from the
PSoC 4 UART.
Figure 6-19. Data Displayed on HyperTerminal
"a" CYPRESS mam m mew. w" Pugxnrr‘r‘l
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 78
Advanced Topics
Figure 6-20. Data Displayed on PuTTY
:iCYPRESS' ' mum mwunllnw MPm-cvacmwmlim an Sdzd walls-“n! Dmflumdmid-yl‘llwy‘wm . brunet Iona [mountain ']
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 79
Advanced Topics
6.2 Using PSoC 5LP as USB-I2C Bridge
The PSoC 5LP serves as a USB-I2C bridge, which can be used to communicate with the USB-I2C
software running on the PC. This project is available with other code examples for the PSoC 4 Pio-
neer Kit at the element14 webpage, 100 Projects in 100 days.
The following steps describe how to use the USB-I2C bridge, which can communicate between the
BCP and the PSoC 4.
1. Create a new CY8CKIT-042 (PSoC 4200) Kit project in PSoC Creator, as shown in the following
figures. Select a specific location for your project and name the project as desired. You must
select the appropriate target hardware (kit) for this project. Ensure that the Select project tem-
plate option is set to ‘Empty schematic’. This example uses PSoC 4200 as the target device and
CY8CKIT-042 as the target board.
Figure 6-21. Select Project Type
CYPRESS mama m wunllnw “dram—u. Mummeammdwuhauumm, club Mahayana-Ills. Wad-lilo 3::th ucnnmtunumt Mum. Envy-aunts: miumwwmmmnmm 'amnqm-mfim—u; m emu-5d Dmimaldmfilmdw Wanuace [9:31:me v] Wuhan-mu: Minn-0| Imam-r cumwww g mam-z Mm
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 80
Advanced Topics
Figure 6-22. Select Empty Schematic Option
Figure 6-23. Create Project
CYPRESS mum in Inunluw (m aim-u 4 v . Cypssfnnmmalng E- Analug has.“ 3- Cnnlnuninifions 3- '2c v 3 mzc sum (5:: mm [v4.0] _ 3- El- '25 1 E unluwl ~ fl SENTTleLOI ; u Sui-Imam mmmnmm El- SMEus/PMBusSI-we , 5| WnTmmkUARTDILSO] 3- sm ‘. fi ummscs mode! Mm - fi um lvzsal cwx cum: mmv ‘E E All Chi-A
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 81
Advanced Topics
2. Drag and drop an I2C component to the top design.
Figure 6-24. I2C Component in Component Catalog
3. To configure the I2C component, double-click or right-click on the I2C component and select
Configure.
Figure 6-25. Open I2C Configuration Window
CYPRESS mum m wunllnw Mariam): E mmmmmmm'w Omsamnwmglam ‘16 fi Ln ‘3 H‘ 4er ‘3 +\ \ Nmmwfld Mir-um Elven-ode mate-mus) Ms Sandi-anus: ME r mmm—m erm
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 82
Advanced Topics
4. Change the component name from I2C_1 to I2C.
5. Configure the I2C with the following settings.
Figure 6-26. I2C Configuration Tab
Figure 6-27. I2C Basic Tab
‘CYPRESS' mum m Inunluw ’mnmy maul/11m ’Man 4 v .valzilsln‘nis am E] \zc bus vohagé M 3 3 fl
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 83
Advanced Topics
Figure 6-28. I2C Advanced Tab
6. Click Apply and then OK to save the changes.
7. Select pin P3[0] for the I2C SCL and pin P3[1] for the I2C SDA in the Pins tab of <poject.cydwr>.
Figure 6-29. Pin Selection
8. Place the following code in your main.c project file. The code will enable the PSoC 4 device to
transmit and receive I2C data to and from the BCP application.
int main()
{
uint8 wrBuf[10]; /* I2C write buffer */
uint8 rdBuf[10]; /* I2C read buffer */
uint8 indexCntr;
uint32 byteCnt;
/* Enable the Global Interrupt */
CyGlobalIntEnable;
/* Start I2C Slave operation */
I2C_Start();
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 84
Advanced Topics
/* Initialize write buffer */
I2C_I2CSlaveInitWriteBuf((uint8 *) wrBuf, 10);
/* Initialize read buffer */
I2C_I2CSlaveInitReadBuf((uint8 *) rdBuf, 10);
for(;;) /* Loop forever */
{
/* Wait for I2C master to complete a write */
if(0u != (I2C_I2CSlaveStatus() & I2C_I2C_SSTAT_WR_CMPLT))
{
/* Read the number of bytes transferred */
byteCnt = I2C_I2CSlaveGetWriteBufSize();
/* Clear the write status bits*/
I2C_I2CSlaveClearWriteStatus();
/* Move the data written by the master to the read buffer so that the
master can read back the data */
for(indexCntr = 0; indexCntr < byteCnt; indexCntr++)
{
rdBuf [indexCntr] = wrBuf[indexCntr]; /* Loop back the data to the read
buffer */
}
/* Clear the write buffer pointer so that the next write operation will
start from index 0 */
I2C_I2CSlaveClearWriteBuf();
/* Clear the read buffer pointer so that the next read operations starts
from index 0 */
I2C_I2CSlaveClearReadBuf();
}
/* If the master has read the data , reset the read buffer pointer to 0
and clear the read status */
if(0u != (I2C_I2CSlaveStatus() & I2C_I2C_SSTAT_RD_CMPLT))
{
/* Clear the read buffer pointer so that the next read operations starts
from index 0 */
I2C_I2CSlaveClearReadBuf();
/* Clear the read status bits */
I2C_I2CSlaveClearReadStatus();
}
}
}
DICYPRESS' ' mmm m vnununw i Budge mm Panel Eng gum 9m Esme Isak flelp a n ‘n’ a e E E E E Em cm Ifilfi‘ Select Port in the Format, then try to connect Opening Port Successfully Cm'meched m Kitirog/ml5172E03242400 Rithog Version 2.02 Oma[&m] El 5 up I Ram |—.,1 l—smm |—__ my mum 2.2mm:
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 85
Advanced Topics
6. Build the project by clicking Build > Build Project or [Shift]+[F6]. After the project is built without
errors and warnings, program ([Ctrl]+[F5]) this code onto the PSoC 4 through the PSoC 5LP pro-
grammer or MiniProg3.
7. Open the BCP from Start > All Programs > Cypress > Bridge Control Panel <version num-
ber>.
8. Connect to KitProg/<serial_number> under Connected I2C/SPI/RX8 Ports.
Figure 6-30. Connecting to KitProg/<serial_number> in BCP
9. Open Protocol Configuration from the Tools menu and select the appropriate I2C Speed.
Make sure the I2C speed is the same as the one configured in the I2C component. Click OK to
close the window.
AiCYPRESS' ' zmnnm m vnununw I Bridge ml_ Eile Editor Chan Encarta i‘l-i @33qu 5‘ 5mm tau-ra- he gm: 9:- 2,-1- belt 5:» illifileEEE! —mmwmmmm metumymust, magnum»: ma page :qully mum: on “mug/msnzennlzmn w Vnsm 2.n2 wow 01? oz. as. M4 p ‘zw an:
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 86
Advanced Topics
Figure 6-31. Opening Protocol Configuration Window in BCP
10.From the BCP, transfer five bytes of data to the I2C device with slave address 0x08. The log
shows whether the transaction was successful. A '+' indication after each byte indicates that the
transaction was successful and a '–' indicates that the transaction was a failure.
Figure 6-32. Entering Commands in BCP
CYPRESS ' mum mnunmw smwm—n- 1% gm: 9:- 2,-1- M m sniaueéss: amp-lunar 1 on 01 oz 03 «p4 . mm Mmfltlflm Lmnummsl,umtqumn A m; Part mm, mm: m umuq/msluxnsuzmn w; Vnsm 2."! on, 01? oz. as» M4 p 01-) 00- 01- «2- us- In- F 'T‘ snail-nu , mum. E D" a"? L r“ [r m ’7‘ --erm Irma“... m m... 9.. a... :m m nu flu: m. .m- zu‘ulmlm wan-W V wmmm mm... so.“ you n n hm)", m- uy u mung: A own-q n“ muy u nmrmmmsumn mm, "ms." 2 a: . an .m. um .. ‘ as; an , 01 o- . ‘ ‘01-» ”- “mm-mu \m—xm. vul’“"" "‘ W a u..- :1.»
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 87
Advanced Topics
Figure 6-33. NACK Indication in BCP
11. From the BCP, read five bytes of data from the I2C slave device with slave address 0x08. The log
shows whether the transaction was successful.
Figure 6-34. Read Data Bytes from the BCP
Note: Refer Help Contents under Help in BCP or press [F1] for details of I2C commands.
CYPRESS ' mama m munnuw rm @Uv .\ « 10 > Firmware > Prugvammer > Knpmgjumluader AQH Xeorm Organize ' Include In llmary ' Shale Wlm ' Bum NEW Volaev * Moms: ‘ Name Date madman Type I Deskiop Kunogjoouoademlt 3/15/2013 6 33 PM ELF me it Downloads : KIlPIogJoolloadevhex 3/15/2013 6 33 PM HEX ma 1.; Dropbox ’ um“. Dly-u
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 88
Advanced Topics
6.3 Developing Applications for PSoC 5LP
The PSoC 4 Pioneer Kit has an onboard PSoC 5LP whose primary function is that of a programmer
and a bridge. You can build either a normal project or a bootloadable project using the PSoC 5LP.
The PSoC 5LP connections in the Pioneer board are summarized in Figure 6-35. J8 is the I/O con-
nector (see section 4.3.7 PSoC 5LP GPIO Header (J8)). The USB (J10) is connected and used as
the PC interface. But you can still use this USB connection to create customized USB designs.
The programming header (J7) is meant for standalone programming. This header needs to be
populated. See the 'No Load Components' section in A.6 Bill of Materials (BOM) on page 125.
Figure 6-35. PSoC 5LP Block Diagram
6.3.1 Building a Bootloadable Project for PSoC 5LP
All bootloadable applications developed for the PSoC 5LP should be based on the bootloader hex
file, which is programmed onto the kit. The bootloader hex file is available in the kit files or can be
downloaded from the kit webpage.
The hex files are included in the following kit installer directory:
<Install_Directory>\CY8CKIT-042 PSoC 4 Pioneer Kit\
<version>\Firmware\Programmer\KitProg_Bootloader
Figure 6-36. KitProg Bootloader Hex File Location
PSoC 5LP
Mini USB (J10)
PSoC 5LP
I/O Header
(J8)
10-pin SWD
programming
and debugging
header
(J7)
D+
D-
P15_6
P15_7
XRES
SWDIO
SWDCLK
SWO
TDI
XRES
P1_0
P1_1
P1_3
P1_4
J8_2
J8_4
J8_3
J8_5
J8_8
J8_7
J8_6
J8_9
J8_10
J8_12
P1 _2 P0_0 P0_1 P3_4 P3_5 P3_6 P3_7 P12_6 P12_7 P3_0
CYPRESS EMIEIIDEB m wununw sham-ma mmmdwmiw,w.um
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 89
Advanced Topics
To build a bootloadable application for the PSoC 5LP, follow this procedure:
1. In PSoC Creator, choose File > New > Project and select Target Device; select <Launch
Device Selector...> from the drop-down list, as shown in Figure 6-37.
Figure 6-37. Opening New Project in PSoC Creator
2. Select CY8C5868LTI-LP039, as shown in Figure 6-38. Click OK; then, click Next.
Note: In PSoC Creator 3.1 or earlier, you must either set the Application Type as Bootloadable
in the New Project window under the Advanced section, or you can change it after project
creation by selecting Project > Build Settings and clicking <Project Name> > Application
Type > Bootloadable. Beginning with PSoC Creator 3.2, the Application Type option is
removed from the New Project window and the Build Settings menu. PSoC Creator 3.2 and later
versions automatically recognize the application type from the TopDesign schematic.
CCYPREss EMIEnnEn m wununw mmolm Erik/mm :flrzaunuams ascsaaumwngs WM] mm: mam» InrHva mm 255 aucsasummzs WM} mm: man» slow mu 2;: auwsulmlmzl Wu; Kacsw mmw slow sun 25: aacsaummas 0mm mm mmw mm)» mm 255 mam“ ‘ amm‘ sans mugging Mamt-Wurmwmvflh nun-Hum. Maummwmmmhmm
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 90
Advanced Topics
Figure 6-38. Selecting Device in PSoC Creator
3. Choose Empty schematic in the Select project template dialog, as shown in Figure 6-39. Click
Next.
Figure 6-39. Choose Empty Schematic
4. In the Create Project dialog, choose the workspace name, location, and project name
(Figure 6-40). Click Finish.
CYPRESS ' smunsumuunmw anamzubmhwd-n- kasvace our. new Mme: W _e' M mp: Imam: CMhfl—M‘Iu \ E] mama-e m M \ a. E: ‘ I n Sadlkr (VI-m m 4 V I cwmwmmhg a. Analog 9- caps“: a Oammnkmns a new E!- WP"! - ram - Pens-m! Pins mmmm Sync" m mammal m _ m lexfin m 09:“sz , Lg mrmmmmm ‘ N am [.170] ‘ m Ezpmmvim ‘ m Emmsspmmvzm - mlmmylnmhm » (khalSqmlflduchleJfll llOTnmleJ’l ‘ E mwmm ‘ E mum! sewn—dam] Mumw
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 91
Advanced Topics
Figure 6-40. Create Project Dialog
5. Navigate to the Schematic view and drag and drop a bootloadable component on the top design.
Figure 6-41. Bootloadable Component in Component Catalog
CYPRESS ' ENIEnnEn m vnununw m /m WWW-mun“ WM tau-1 a; litTI-IEXHW -_marm—mmmn£mmh ‘5. an. amt-m: WHEXII: Search #3er 500mm )3 Organile' Newcomer El 0 I Damp ‘ Name Date modified Type I Dam-loads 8 Drum 35 mm Places 1 KixProgjomloademex 3/18/2013 $33.. HEX Flle a Lmranes L1 Documents $ Music 3 Pictures 3 Wm xi Compmer g WindowsLUS ((2 $ Lermojmvery v 4 Filemmc Kimehoxlmdenmx v HaFilesPJ-q) v
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 92
Advanced Topics
Set the dependency of the Bootloadable component by selecting the Dependencies tab in the
configuration window and clicking the Browse button. Select the KitProg_Bootloader.hex and
KitProg_Bootloader.elf files; click Open.
Figure 6-42. Configuration Window of Bootloadable Component
Figure 6-43. Selecting KitProg Bootloader Hex File
CYPRESS EMIEnnin m wunllnw :vao um moan-ea 'ypc 1/13/2013 197 AM m we flcompm Lac-mam) i mrmmm' ‘ @ Hug-m:
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 93
Advanced Topics
Figure 6-44. Selecting KitProg Bootloader File
3. In the General tab, check the Manual application image placement checkbox and set the
Placement address as “0x00002800” as shown in Figure 6-45.
Figure 6-45. Bootloadable Component-General Tab
4. Develop your custom project.
5. The NVL setting of the Bootloadable project and the KitProg_Bootloader project must be the
same. The KitProg_Bootloader.cydwr system settings is shown in the following figure.
CYPRESS inunnsn m Inunluw ovum m. a I‘mfigummn szetmfignxmuu ‘ Mezwcummum Emmwn Mg M, flnukd Damn-nil) NGDS‘KM mm um mmmsmmm.‘ UMP] N5 5 nwmngxmwm Emmmmm Emir-am") "(amen-Mus a Dwafirvgtnmumg vnmm vammm ‘ vmnM ‘ vmmm mm mm mmzm van-meme 5.. m w" mm Build news W ‘mhefiifliumaumxm Imlldrivers'oruvlsion “m QQ _—l .mmauux ,fi-Afi: 41:. DmPamCoannTool— Sevif go DMAWIzard. 35 BI BomlolderHosL wmsm'amhnduue W (I M) , a E Pug-c1 'W [cvmn—um 9PM"- v impugn cysch ‘- 1 g ammuecym g Eb mm- 7&1 mu 0 \ o 5 \ a. SmMFIIu
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 94
Advanced Topics
Figure 6-46. KitProg Bootloader System Settings
6. Build the project in PSoC Creator by selecting Build > Build Project or [Shift]+[F6].
7. To download the project on to the PSoC 5LP device, open the Bootloader Host Tool, which is
available from PSoC Creator. Select Tools > Bootloader Host.
Figure 6-47. Opening Bootloader Host Tool from PSoC Creator
8. Keep the reset switch (SW1) pressed and plug in the USB Mini-B connector. If the switch is
pressed for more than 100 ms, the PSoC 5LP enters into bootloader. The PSoC 5LP also enters
into bootloader when the power supply jumper for the PSoC 4 (J13) is removed and
subsequently the USB Mini-B connector is plugged into header J10.
CYPRESS ' mum mxnununw Mmmm max El: Ann-s “Q! \ ' &@I%% (Q m: —‘WMWWWW,WMWWW« Q mm: m Sunni”! «anyway Punk nan mnmmmmm vmw mums Lu; mums-1.1.45.“ usnhanan-Dammtnmrusn m w Puma
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 95
Advanced Topics
9. In the Bootloader Host tool, click Filters and add a filter to identify the USB device. Set VID as
0x04B4, PID as 0xF13B, and click OK.
Figure 6-48. Port Filters Tab in Bootloader Host Tool
10.In the Bootloader Host tool, click the Open File button to browse to the location of the bootload-
able file (*.cyacd).
Figure 6-49. Opening Bootloadable File from Bootloader Host Tool
cCYPRESS' mum-1mm vnununw wow u « cm»: > Amman > new » - 4, WWW p ' CI 9 t mama Name Dale "loomed Yype I Mg i new W MMS Booms-1m x: Dvopbox “.5 Receml’htn Organize . New loldev 4/13/2013 1134 PM file folder 4 13 1214 w cum me a my"; L1 Dommems 4 Musk 8 Flame: 1 Videos sli Computer .4 winmma mic ' ‘ g > WWW ~
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 96
Advanced Topics
11. Press the Program button in the Bootloader Host tool to program the device.
Figure 6-50. Selecting Bootloadable.cyacd File from Bootloader Host
12.If bootload is successful, the log of the tool displays "Successful"; otherwise, it displays "Failed"
and a statement for the failure.
Notes:
1. The PSoC 5LP pins are brought to the PSoC 5LP GPIO header (J8). These pins are selected to
support high-performance analog and digital projects. See A.2 Pin Assignment Table on
page 120 for pin information.
2. Take care when allocating the PSoC 5LP pins for custom applications. For example, P2[0]–P2[4]
are dedicated for programming the PSoC 4. Refer to A.1 CY8CKIT-042 Schematics on page 116
before allocating the pins.
3. When a normal project is programmed onto the PSoC 5LP, the initial capability of the PSoC 5LP
to act as a programmer, USB-UART bridge, or USB-I2C bridge in not available.
4. The status LED does not function unless used by the custom project.
For additional information on bootloaders, refer to Cypress application note, AN73503 - PSoC® USB
HID Bootloader.
' sumnzumwunmw amm— . Sci—1W!!! mmwamiw,m.um mm, 0 7.9:», O Tatum. ©Tmm; 1154:5111 O LII-wuss: O Walt-unc-
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 97
Advanced Topics
6.3.2 Building a Normal Project for PSoC 5LP
A normal project is a completely new project created for the PSoC 5LP device on the CY8CKIT-042.
Here the entire flash of the PSoC 5LP is programmed, overwriting all bootloader and programming
code. To recover the programmer, reprogram the PSoC 5LP device with the factory-set KitProg.hex
file, which is shipped with the kit installer.
The KitProg.hex file is available at the following location:
<Install_Directory>\CY8CKIT-042 PSoC 4 Pioneer Kit\<version>\Firm-
ware\Programmer\KitProg
This advanced functionality requires a MiniProg3 programmer, which is not included with this kit. The
MiniProg3 can be purchased from www.cypress.com/CY8CKIT-002.
To build a normal project for the PSoC 5LP, follow these steps:
1. In PSoC Creator, choose File > New > Project and select Target device; select <Launch
Device Selector...> from the drop-down list as shown in Figure 6-51.
Figure 6-51. Opening New Project in PSoC Creator
2. Select CY8C5868LTI-LP039, as shown in Figure 6-52. Click OK and click Next.
CYPRESS ' smunsumuunmw @ mmm Emma“. alumna-us mmlmis (mum mm mam marrow 67.01 m 54 2 72 v , 4 mcsmmwm mum mm mam slrQrN 57m 255 54 2 46 v , q CVICSWH'FU’IBI COMM} MSW mcsuw GI-QFN 67.0] 256 6‘ 2 M V v J mcsmm-Lms (mam 119::va mum lnfl-YQFP mm 255 u z 72 v - J ‘ m > ado—1mm \ WI \ gnaw—um: MIMWWI‘WMII’IIHWWWV Dawns“: Maumwwmmmhmm.
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 98
Advanced Topics
Figure 6-52. Select Device
3. Choose Empty schematic in the Select project template dialog, as shown in Figure 6-53. Click
Next.
Figure 6-53. Choose Empty Schematic
' snunnsumuunmw MW 0“:deth Wovksvace 0mm wank-paw v \ E
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 99
Advanced Topics
4. In the Create Project dialog, choose the workspace name, location, and project name
(Figure 6-54). Click Finish.
Figure 6-54. Create Project Dialog
5. Develop your custom project.
6. Build the project in PSoC Creator by selecting Build > Build Project or [Shift]+[F6].
7. Connect the 10-pin connector of MiniProg3 to the onboard 10-pin SWD debug and programming
header J7 (which needs to be populated).
8. To program the PSoC 5LP with PSoC Creator, click Debug > Program or [Ctrl]+[F5]. The Pro-
gramming window shows MiniProg3 and the selected device in the project under it
(CY8C5868LTI-LP039).
9. Click on the device and click Connect to program.
Notes:
1. The 10-pin SWD debug and programming header (J7) is not populated. See the 'No Load Com-
ponents' section of A.6 Bill of Materials (BOM) for details.
2. The PSoC 5LP pins are brought to the PSoC 5LP GPIO header (J8). These pins are selected to
support high-performance analog and digital projects. See A.2 Pin Assignment Table for pin infor-
mation.
3. Take care when allocating the PSoC 5LP pins for custom applications. For example, P2[0]–P2[4]
are dedicated for programming the PSoC 4. Refer to A.1 CY8CKIT-042 Schematics before allo-
cating the pins.
4. When a normal project is programmed onto the PSoC 5LP, the initial capability of the PSoC 5LP
to act as a programmer, USB-UART bridge, or USB-I2C bridge in not available.
5. The status LED does not function unless used by the custom project.
EMPRESS
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 100
Advanced Topics
6.4 PSoC 5LP Factory Program Restore Instructions
The CY8CKIT-042 PSoC 4 Pioneer Kit features a PSoC 5LP device that comes factory-programmed
as the onboard programmer and debugger for the PSoC 4 device.
In addition to creating applications for the PSoC 4 device, you can also create custom applications
for the PSoC 5LP device on this kit. For details, see section 6.3 Developing Applications for PSoC
5LP on page 88. Reprogramming or bootloading the PSoC 5LP device with a new flash image will
overwrite the factory program and forfeit the ability to use the PSoC 5LP device as a programmer/
debugger for the PSoC 4 device. Follow the instructions to restore the factory program on the PSoC
5LP and enable the programmer/debugger functionality.
6.4.1 PSoC 5LP is Programmed with a Bootloadable Application
If the PSoC 5LP is programmed with a bootloadable application, restore the factory program by
using one of the following two methods.
6.4.1.1 Restore PSoC 5LP Factory Program Using PSoC Programmer
1. Launch PSoC Programmer 3.27.1 or later from Start > Cypress > PSoC Programmer.
2. Configure the Pioneer Kit in Service Mode. To do this, while holding down the reset button (SW1
Reset), plug in the PSoC 4 Pioneer Kit to the computer using the included USB cable (USB A to
mini-B). This puts the PSoC 5LP into service mode, which is indicated by the blinking green sta-
tus LED.
CYPRESS ' mmm m vnununw m sum M (NW m:— (Wlarw P890 4 Puma:- Km memde-sganmmn « E > Pawev Gide Pawev Dam on Cam 5:: Ca 10:! mm 0W W W m ‘55,, ‘20 WNW 9..., 7mg,” , 2“ ‘3“ w M W. M. . Connmrted a: s:4n:n Pu Kxchq bacclcaflex dance 1: detected Please close all ports, men nauqace no me umme: cab and suck the Upgrade (Innate Duncan m recover Bridge sum: Part In :11: Portlasc. then m: m Donn:m: 9:le 5:: m cucsasam'bunas at 252144 mass bycu «32:25 as 9:le Emly 5:: m cyacsmLP at 5:35:29 9:: Act“: nzx n): a: a: C:\onqram 51):: (xasnmuuxcvacnrnn PSoC 4 Plone:r 6:32:25 Pu ch\l.fl\!1man\quxmr\chqu\chqu.Xxx am: In": be ”are m: m. mum“; gs“: dawns: should m 5. mm: or quranmed a: 5v mm; :0 mm cans: mg: m :11: dune Cncnsnx n1. mm Cpliuns Help mm >11 Puma-B'Ummm ma mwww:m \ mm ‘M|ammudcnamm mum Dumeli/ om: m Rab . . 1 m Knncq boatloadex dance 1: detected Plaza: :1“: a!) pore}, mm mvlquz: m m: mun“, m: and clxck u: made Flmwaxe huccon m recover nudge Connected a: 6:4
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 101
Advanced Topics
3. The following message appears in the PSoC Programmer results window: “KitProg Bootloader
device is detected”.
Figure 6-55. PSoC Programmer Results Window
4. Switch to the Utilities tab in PSoC Programmer and press the Upgrade Firmware button.
Unplug all other PSoC programmers (such as MiniProg3 and DVKProg) from the PC before
pressing the Upgrade Firmware button.
Figure 6-56. Upgrade Firmware
CYPRESS ' mum w muIIIIIuw BMPWHW a -——. “fin” m. V544 up.“ ”up I~‘ox aamgma mm «D unhnu— me KIIng/Immznmzmm mm mmmmmxm a...“ mluvinuI-undmlihbbfl: warm I flash I . Baum mmmzLua I I Mum: mun mmg Vaxzxun lmnmnwm I It.“ apex. Mum a: mam m - Sucttdcd “mm". . _Im,“,,,,_,,_u_ I anamq. V Inlnanuw. I Yxmire mm. nag-unscad .: 1 an m I “a". mum :a m V mm. m and mu m. Uganda Elmaza batten ‘ m: 09:an .Im Fluxmq: M 1:52:49 PM [“qu mum lwtnan 2.”, m mm 2.17. I «mum Fun: I“ 3.52.47 m I connected at 3:52 Is m chYm/imliaznnnzaz’nn I Cmmected ac zIszIaI a4, mm; mcmm dune: I. ne:acceu ”wanna
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 102
Advanced Topics
5. After programming has completed, the following message appears: “Firmware Update Finished
at <time>”.
Figure 6-57. Firmware Update Complete
6. The factory program is now successfully restored on the PSoC 5LP. It can be used as the pro-
grammer/debugger for the PSoC 4 device.
CYPRESS ' sumnzmwunmw a: WWTwmIn-mnummmnhngmfimupd El Pm: WW- m Communkniom For! (mum ~ qur Ik \mHmHmHmHmHmJ Date madmed Type Liar-Wu: mmmm caconk
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 103
Advanced Topics
6.4.1.2 Restore PSoC 5LP Factory Program Using Bootloader Host Tool
1. Launch the Bootloader Host tool from Start > Cypress > PSoC Creator.
2. Using the File > Open menu, load the Kit Prog.cyacd file, which is installed with the kit software.
The default location for this file is: <Install_Directory>\CY8CKIT-042 PSoC 4 Pioneer
Kit\<version>\Firmware\Programmer\KitProg\KitProg.cyacd
Figure 6-58. Load KitProg.cyacd File
CYPRESS ' snmnsumuunmw QMmem Regain-and: "\ ‘0 EEQ (‘3 R: CMRBWWTMMIMMHWWMWMW E mammwmnafll BMW mmwmmmm m mmnpurwm mmwnlkuamgmrusa mow PID rm
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 104
Advanced Topics
3. Configure the Pioneer Kit in Service Mode. To do this, while holding down the reset button (SW1
Reset), plug in the PSoC 4 Pioneer Kit to the computer using the included USB cable (USB A to
mini-B). This puts the PSoC 5LP into service mode, which is indicated by the blinking green sta-
tus LED.
4. In the Bootloader Host tool, set the filters for the USB devices with VID: 04B4 and PID: F13B.
USB Human Interface Device port appears in the Ports list. Click that port to select it.
Figure 6-59. Select USB Human Interface Device
5. Click the Program button (or menu item Actions > Program) to restore the factory-program by
bootloading it onto the PSoC 5LP.
6. After programming has completed, the following message appears: “Programming Finished Suc-
cessfully”.
CYPRESS ' EMIEnnEn mwununw KflngflSI'UARTKDMSO] um lnvmguammmm , nz Lu, mm ‘ nun: mmmmw mmlfirlrm WM . mlsrurmmmnmm mun-arm...” WM mlrumt ms...“ an —
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 105
Advanced Topics
Figure 6-60. Programming Finished Successfully
7. The factory program is now successfully restored on the PSoC 5LP. It can be used as the pro-
grammer/debugger for the PSoC 4 device.
6.4.2 PSoC 5LP is Programmed with a Standard Application
If PSoC 5LP is programmed with a standard application, restore the factory program by using the fol-
lowing method.
1. Launch PSoC Programmer 3.27.1 or later from Start > Cypress > PSoC Programmer.
2. Use the File > Open menu to load the KitProg.hex factory program hex file, which is shipped with
the kit. The default location for this file is: <Install_Directory>\CY8CKIT-042 PSoC 4
Pioneer Kit\<version>\Firmware\Programmer\KitProg
3. Connect a CY8CKIT-002 MiniProg3 (sold separately) to the computer. The 10-pin connector
cable on the MiniProg3 plugs into the header [J7]. Note that the J7 header is unpopulated. For
more details, see A.6 Bill of Materials (BOM) on page 125.
CYPRESS ' zmnnm m voununw mmuww I~3©IIEQD Pasha" 11’ Plug-mm Bit?) Mm an Ex): m u 5:111:13 m thuln run .z L45 m Cannecvxd u 5:16:15 PM mun: many m w mm“ a m“: m n): m u 5:14:53 m Humry I’m: m (m. m mama m: 5' Humry I’m: m (m. m lwlztd u s Samanfully Cmm=cztd w «lawman/“awn Humry I’m: m (m. m mama m: 5' Run: m w mosznnzxrmsa u 5. Ihmzy mm mm in. six kmalzd u 5 li mwlmma mm“ mm mm: mm m‘mam1wMW.wwnM_ mm.“ “mm ‘ , m Mam mm m Mummmnm WK] mm -- H, mm m a.“ m, mg bun m Sim-(my txv u (VI xmbam 5'“ “5"" Am“. mm. A awnmm. nlnmynxnflannrnqz me . I‘m: lxv.\l.fl\hmnuxe\lxwxulmx. mums mum. 2.n§ [SAD/2.0!] mmwa/mmnunm 5am run u. m mm", Lhm u, m mm ”4:576 rm- mm 55!}: Z:mnumqmMiaminaqmian\Buryimiaaanssukmsmn L J-_—
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 106
Advanced Topics
4. Ensure that MiniProg3 is the selected port in PSoC Programmer and the 10-pin connector (10p
option) is selected, as shown in the following figure. If the board is not powered over USB, select
the Power Cycle programming mode.
Figure 6-61. Select MiniProg3
5. When ready, press the Program button (or File > Program) to program the PSoC 5LP device.
CCYPREss Mama 0: xnunllnw m. V“ 0.,“ms '-3®@@®%DB‘ He‘p m m ”5.5.. 11) ammu‘mkIm In. uamz Mummy...“ m Oman-anu-Wrmen-smm WMMWWW .5 Fromm Buttun hm MWWW MM <7 was="" by="" mom="" vadan="" w="" m="" 5a="" ‘="" idu="" 013nm="" v="" mummy:="" 3,3,,="" —="" ml="" (311159="" sum="" ’7="" ‘35?="" at="" m="" 19553:.“="" d“="" m="" 0;;="" 11'“="" ‘snv="" jjvvzsv="" 19v="" waxy="" ,pm="" v="" ‘5="" j="" a="" ”nv="" m="" m.="" yanxmnnq="" succzcdtd="" nmq="" mum="" mm="" mm:="" yanxmnnq="" at="" nm="" sumttdkd.="" “mm-5.;="" ui="" nun="" 55mm;="" inn:="" “5:55.555="" draw="" 5::="" m="" cucsnénulrmna!="" .5="" 5.55.55="" mm="" mm="" me:="" mxm="" mm="" m="" (.5="" harsmlp="" .5="" 5-55-55="" almanacxmllv="" nucnm="" 9mm="" cylcsasalteryr-as="" 17:0qu="" kmactd="" .5="" 5:55="" m="" m="" succzasfully="" gamma="" ca="" 5="" “mwnnm="" .5="" 5:55:42="" pm="" mmyma="" vex-non="" 2="" n5="" [5.5m="" n5.="" wamnq="" 5m="" .5="" 5-5“)="" m="">
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 107
Advanced Topics
6. After programming has completed, the following message appears: “Program Finished at
<time>”.
Figure 6-62. Program Finished
7. The factory program is now successfully restored on the PSoC 5LP. It can be used as the pro-
grammer/debugger for the PSoC 4 device.
6.5 Using µC/Probe Tool
Micrium’s µc/probe is a windows application that allows you to read and write the memory of any
embedded target processor during run-time, and map those values to a set of virtual controls and
indicators placed on a graphical dashboard.
This tool helps in designing a simple GUI for the code examples of the development kits with least
effort.
Please note that Micrium µC/Probe tool is not pre-requisite software required to run this kit and does
not get installed along with kit contents.
The license required to use all the features of the tool need to be purchased separately by the user.
However, the educational edition of the tool is available as a free download from
https://www.micrium.com/download/ucprobe-win-installer/.
The Educational Edition of μC/Probe is available for free to enable you to “try before you buy”. For
more details on licensing and the µC/Probe tool, refer to the µC/Probe User Guide and µC/Probe
Target Manual. To learn more about the µC/Probe, visit: micrium.com/tools/ucprobe/overview/.
In Micrium µC/Probe, the Cypress KitProg is being supported as a means of communication to the
target device connected to PC.
@cvmss mum- :- mun-u
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 108
Advanced Topics
When a code example is built in PSoC Creator, it produces the output files in HEX, LST, MAP, RPT,
and ELF formats.
The ELF file lists all the symbols (variables), symbol types and its addresses. The Micrium µC/Probe
tool reads the ELF file and detects these symbols (global variables) used in the code.
The µC/Probe tool provides a host of graphical controls such as sliders, RGB palette, graphs, and
donuts. The controls required can be dragged and dropped onto µC/Probe workbench and symbols
from ELF file can be assigned to the controls.
When the workbench is run, the changes in symbol value associated with the controls (slider, graph,
and so on) can be visualized on the PC.
Appropriate global variables have been assigned in CapSense and PWM code examples of the kit to
visualize the CapSense output and PWM output on a GUI.
Note: The ELF file is generated by PSoC Creator and is removed during the project clean process.
To use any of the WSPX files, ensure that you build the project so that the ELF file is generated. Oth-
erwise, the µC/Probe tool pops up a message the ELF file is missing.
6.5.1 CapSense Code Example
To visualize the output of CapSense project using µC/Probe tool, follow the steps given below:
1. Program the CapSense code example on CY8CKIT-042 by following steps 1–8 in chapter 5.
2. Download and install µC/Probe tool from https://www.micrium.com/download/ucprobe-win-
installer/.
3. Launch µC/Probe from Start > All Programs > Micrium > uC-Probe > Micruim uC-Probe.
Figure 6-63. Micrium µC/Probe
mu nnnnnnnnn
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 109
Advanced Topics
4. Drag and drop a Custom Slider control from Writable Controls in Toolbox on to the Datascreen1.
Figure 6-64. Adding Slider Control
5. Next, add a RGB Palette from Writable Controls in Toolbox on to the Datascreen1.
Figure 6-65. Adding RGB Palette Control
6. The DataScreen1 looks as below after adding both the controls.
Figure 6-66. DataScreen with Slider and RGB controls
EI£B§§§ $2 Ivan-i. a; _ gruff:
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 110
Advanced Topics
7. Now, click the ELF button in the Symbol Browser window.
Figure 6-67. ELF Button in Symbol Browser
8. Browse and point to the CapSense.elf file to load the symbols (global variables) from the
CapSense code example. Wait until the elf file is loaded. The elf file is in the collapsed state by
default. It can expanded by clicking the ‘+’ button next to the file name.
9. On expanding the elf file, it can be seen that the Symbol Browser displays all the .C files in the
code example. By expanding each file, the global variables defined in that C file are displayed
with its name, type, size, memory address, and so on.
10.Now, expand the main.c file to view the global variables defined in main.c file.
Figure 6-68. Global variables in Symbol Browser
AiCYPRESS' ' :uunnzmwumuw bmnmmhmm n—Fn “F” ‘-m IE: Omit-ml :,m~n—w@@ luau-n: Ina mm (1
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 111
Advanced Topics
11. Drag and drop the global variable µcSlider on to the custom slider control to see the slider output.
Similarly, drag and drop the global variable µcARGB on to the RGB Palette to see the RGB
output.
Figure 6-69. Assigning slider output to Custom Slider control
£2 CYPRESS" mum in Inunluw ounmrnnm u Wfiflfl—mflfi Ghoul—u omnuwQE "It!" no w... mm D a x um... J'w. ' a W W \ a (nu-mm mm a ran-w w ‘ 1 mm m a mu '0" ‘ a W W a an nu: m M was m: ‘ 4' infingrarwam . '_I Q: imdflukmm ' E “"" M x Alma. .-
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 112
Advanced Topics
Figure 6-70. Assigning RGB output to RGB Palette control
12.Connect the CY8CKIT-042 to the computer. Click the Settings button in the µC/Probe tool.
Figure 6-71. Settings Button in µC/Probe
CYPRESS ' mum mmunllnw “Mm m u n S 2 S: g \ Endilllness 0 Link Endiln 0 Big mau- Sminks O svlnboIs/sec O bytes/sec \' Ime Hues None 9 Cloud Onlv Tuna Residcm Code 9 Your 9 ns-zn y w Debug luterfues y l-Llnk y cuss-o»
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 113
Advanced Topics
13.In the µC/Probe setting window, select the Cypress PSoC Prog and select ‘KitProg/<Kit Prog
number>’ from the drop down box for Port and click OK to start communication between the
CY8CKIT-042 and the µC/Probe tool.
Figure 6-72. µC/Probe Settings
CCYPREss ' ENIEnnm m voununw @I990_ I. Home E 9’“ O " ‘ DE qfi E Fm Senmg Run Paste 5m" X 5% Apphtahon (hpbaam Toolbox R —Fl 50 G F1 50 B F a A El- 0 300323200
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 114
Advanced Topics
14.Click the Run button to start.
Figure 6-73. Run Button
15.Now, move your finger on the CapSense slider on the kit and observe the Custom Slider and
RGB Palette control output on the datascreen.
Figure 6-74. Custom Slider and RGB Palette output
Note: If you are using Education edition of µC/Probe tool, pop-up windows will be displayed
before starting datascreen. Click OK to continue. Also, the Datascreen (output) will time-out after
1 minute in case of Education edition.
16.Click the File tab and select Save to save the µC/Probe project. Provide an appropriate name
and select a location to save your project. The µC/Probe projects are saved with extension
.WSPX. Double-clicking a .WSPX file opens the µC/Probe tool.
6.5.2 PWM Code Example
The µC/Probe project for PWM project is already created and packaged along with kit content. The
µC/Probe projects can be found in the installation folder at <Install_Directory>\CY8CKIT-
042 PSoC 4 Pioneer Kit\<version>\µCProbe.
1. Program the PWM code example on CY8CKIT-042 by following steps 1–8 in 5.4 PWM on
page 49.
2. Double-click the CY8CKIT-042_PWM.wspx file.
nnnnnnnnnnnnnnnnnn
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 115
Advanced Topics
3. Browse and point to the PWM.elf file to load the symbols (global variables) from the PWM code
example.
4. Connect the CY8CKIT-042 to PC and follow steps 12 to 14 described above to start running the
datascreen.
5. The PWM compare values are displayed graphically and the RGB palette displays the RGB LED
output on the datascreen.
Figure 6-75. PWM Compare Values and RGB Output
p21 x :11 vss 9d no] p11 m:- w; 5% menu 1; (11151113 °m~1 11,1111 1. n 1. n 1. n a a 1 q 1 1 1 1 1 1 1 1 > 1 1 1 «2 FM m VDD R10 47x 178°C 4 IXRES '— ACYPRESS aunannzn m rnnnnnnw‘ no mm VDD R5 zzxo L
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 116
A. Appendix
A.1 CY8CKIT-042 Schematics
PLACE CAPS CLOSE TO POWER PINS
PSoC 4
Sh_tank
NO LOAD
P2_0
P2_1
P2_2
P2_3
P2_4
P2_5
P2_6
P2_7
SWDIO
SWDCLK
P3_4
P3_5
P3_6
P3_7
P4_0
P4_1
P4_2
P0_0
P0_1
P0_2
P0_3
P0_4
P0_5
P0_6
P0_7
/XRES
P1_0
P1_1
P1_2
P1_3
P1_4
P1_5
P1_6
P4_3P3_0
/XRES
P3_1 P1_7
P4_VDD
VCCD
P4_VDD
P4_VDD
P4_VDD
P4_VDD
VDD P4_VDD
VTARG
0603
R10
4.7K
0603
C10
1.0 uF
C9
10000 pF
0603
C3
1.0 uF
0402
C7
0.1 uF
0603
C8
1.0 uF
0805
R6 ZERO
U2
CY8C4245AXI-483 44TQFP
VSS
1
P0_0 24
P0_1 25
P0_2 26
P0_3 27
P0_4 28
P0_5 29
P0_6 30
P0_7 31
VSS
10
P1_0 37
XRES 32
P1_1 38
P3_2_SWDIO
13
P3_3_SWDCLK
14
P3_4
15
P3_5
16
P3_6
17
P3_7
18
P2_0
2
P2_1
3
P2_2
4
P2_3
5
P3_1
12
P3_0
11
P2_7
9P2_6
8P2_5
7P2_4
6
VDDD 34
VDDD
19
P1_2 39
P1_3 40
VSSA 36
P1_4 41
P1_5 42
P1_6 43
P1_7 44
P4_0
20
P4_1
21
P4_2
22
P4_3 23
VCCD 33
VDDA 35
J13
2 PIN HDR
1
1
2
2
0603
R4 ZERO
0402
C2
0.1 uF
0603
C5
1.0 uF
CYPRESS ' mmm m voununw vans m D W m :3 m mm 1 2 pm my 2 m m 49 5mm l E g was / 901 us l m m mum T Rama) Pswvm m ’I)‘ User Interface
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 117
Power Supply
Input Voltage Range VIN is 5-12V
LDO
NO LOAD
NO LOAD
NO LOAD
V3.3
VBUS
VIN
V3.3
VBUS
VDD
VDD VIN
J9
11
22
33
TP1 RED
0603
R2 ZERO
+
3216
C4
10 uFd 25v
SOD123
D2
J11
2 PIN HDR
1
1
2
2
R3 560 ohm
SOD123
D1
+
3216
C6
22 uFd 16v
SOD123
D11
SOD123
D12
0805
D3
Power LED
2 1
R35
232 ohm
0603
C26
1.0 uF
U1
NCP1117DTARKG
ADJ
1
VOUT 2
VIN
3
TAB 4
SOD123
D13
R36
120 ohm
I2C Connection b/w PSoC 5LP and PSoC 4
P5LP12_0 P3_0
P5LP12_1 P3_1
P5LP12_2
P5LP12_3
0603
R25
ZERO
0603
R22
2.2K
0603
R23
2.2K
0603
R24
ZERO
Shunt
Resistor
CAPSENSE TUNING CIRCUITRY
Default Loaded For CSD
NO LOAD
Shield Setting
P4_2
ShieldP0_1
0603
R45 ZERO
C1
2200 pF
0603
R44 ZERO
R1
NO LOAD
User Interface
USER BUTTON
RESET
P1_1
P1_2
P1_3
P1_4
P1_5
P5LP3_1
P0_2
P0_3
P1_6
/XRES
P0_7
P5LP_VDD
P4_VDD
RG
B
D9
RGB LED
1
2 3
4
SW2
EVQ-PE105K
1 2
R29 1.5K
R30 1.5K
0805
R31
330 ohm
SW1
EVQ-PE105K
1 2
R28 2.2K
R17
560 ohm
R20
560 ohm
R21
560 ohm
R19
560 ohm
CSS1
CapSense Slider 5 Seg
1
2
3
4
5
0805
D10
Status LED Green
2 1
R18
560 ohm
CYPRESS ' mum w munuuw m mu m Mm Capacxtnx ; >st m m m; L; may u. may gnu}, my; are flawed for w m m Paw van Paw m5: PSDC am Programme: / Debugger v: m
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 118
PSoC 5LP Programmer / Debugger
NO LOAD
P5LP0_4 to P5LP0_7,
P5LP3_2, P5LP3_3 are
reserved for HW REV ID
SAR Bypass
Capacitor
Del Sig Bypass
Capacitor
NO LOAD
DP
DM
P5LP_XRES
P5LP12_0
P5LP12_1
P5LP2_2
P5LP2_1
P5LP2_0
P5LP3_0
P5LP3_4
P5LP3_5
VSSD
P5LP_VCCD
P5LP_VCCD
VSSD
VSSD
VSSD
DM_P
DP_P
P5LP1_7
P5LP1_6
VBUS
P5LP_XRES
P5LP_SWDCLK
P5LP_SWDIO
P5LP_SWO
P5LP_TDI P5LP3_7
P5LP3_6
P5LP2_3
P5LP2_4
P5LP0_0
P5LP0_1
P5LP12_6
P5LP12_7
P5LP1_2
P5LP0_2
P5LP12_3
P5LP3_1
P5LP0_3
P5LP12_2
VTARG P5LP_VDD
P5LP_VDDP5LP_VDD
P5LP_VDD
P5LP_VDD
P5LP_VDD
VTARG P5LP_VDD
P5LP_VDD
VDD
0603
C13
1.0 uF
0402
C17
0.1 uF
U3
CY8C5868LTI-LP039 QFN68
P2_6
1
P2_7
2
P12_4 I2C0_SCL, SIO
3
P12_5 I2C0_SDA, SIO
4
VSSB
5
IND
6
VBOOST
7
VBAT
8
VSSD
9
XRES
10
P1_0
11
P1_1
12
P1_2
13
P1_3
14
P1_4
15
P1_5
16
VDDIO1
17
P1_6
18
P1_7
19
P12_6_SIO
20
P12_7_SIO
21
P15_6 DP
22
P15_7 DM
23
VDDD
24
VSSD
25
VCCD
26
P15_0
27
P15_1
28
P3_0
29
P3_1
30
P3_2
31
P3_3
32
P3_4
33
P3_5
34
VDDIO3 35
VDDIO0 52
P0_3 51
P0_2 50
P0_1 49
P0_0 48
SIO_P12_3 47
SIO_P12_2 46
VSSD 45
VDDA 44
VSSA 43
VCCA 42
P15_3 41
P15_2 40
SIO, I2C1_SDA P12_1 39
SIO, I2C1_SCL P12_0 38
P3_7 37
P3_6 36
P2_4 66
P2_3 65
P2_2 64
P2_1 63
P2_0 62
P15_5 61
P15_4 60
VDDD 59
VSSD 58
VCCD 57
P0_7 56
P0_6 55
P0_5 54
P0_4 53
VDDIO2 67
P2_5 68
EPAD 69
0603
R2622E
0603
C11
1.0 uF
0603
C29
1.0 uF
0603
R16 ZERO
0603
R15 ZERO
0402
C14
0.1 uF
R40
3K
0603
C18
1.0 uF
R37
1.5K
0603
R2722E
0603
R11 ZERO
0402
C20
0.1 uF
0603
R7 ZERO
0603
R12 ZERO
0603
C28
1.0 uF
0603
C19
1.0 uF
0603
C23
1.0 uF
R38
3K
0402
C12
0.1 uF
0805
R5 ZERO
R39
1.5K
0402
C22
0.1 uF
0402
C21
0.1 uF
0603
R41
4.7K
0603
R14 ZERO
0402
C15
0.1 uF
0402
C24
0.1 uF
Protection Circuit
NO LOAD
NO LOAD
V3.3_EXT V3.3
Q1
PMOS( DMP3098L-7)
Q3
PMOS( DMP3098L-7)
R43
442 ohm
0603
R46 ZERO
TVS3
5V 350W
Q2
PMOS( DMP3098L-7)
D5
Vz=2V(BZT52C2V0-7-F)
R42
1K ohm
aCYPRESS' ' ENIEnnm m voununw 2suc . / sz; saw my no 5»: vsus ‘ w as m m m ND mm mnK m mm- m yzugxim/nebdg “Esau as am up m m mm“ Sm m me ,u em q, mum men Earns cuwanble deadgxs m m sum m up“; Mama Campatxble ma
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 119
USB MiniB
NO LOAD
DP
DM
VBUS
0402
R13100K
0603
D7
0603
D6
J10
USB MINI B
VBUS 1
DM 2
DP 3
GND 5
ID 4
S1 6
S2 7
S3
8
S4
9
0402
C16 0.01 uF
F1
PTC Resettable Fuse
1 2
0603
D8
TP2 RED
PSoC 4 / External PSoC Program/Debug Header
PSoC 5LP Program/Debug Header
NO LOAD
PCA
PCB
FAB
AS
P5LP2_0
P5LP2_1
P5LP2_4
P5LP2_2
P5LP2_3
SWDIO
SWDCLK
/XRES
P5LP_SWO
P5LP_XRES
P5LP_SWDCLK
P5LP_TDI
P5LP_SWDIO
VTARG
P5LP_VDD
Title
Size
Title
Size
Title
Size
TVS1
5V 350W
0402
C27
0.1 uF
J6
50MIL KEYED SMD
1
3
5
7
9
2
4
6
8
10
J7
50MIL KEYED SMD
1
3
5
7
9
2
4
6
8
10
0603
R32 ZERO
0603
R33 ZERO
TVS2
5V 350W
0603
R34 ZERO
0402
C25
0.1 uF
(J1-J4) Arduino Compatible Headers
J5 Digilent PMOD Cards
Compatible Headers
NO LOAD
I2C Pull up
Resistors
J12 Arduino ICSP
compatible header for
SPI Interface
NO LOAD
P2_0
P2_1
P2_2
P2_3
P2_4
P2_5
P0_0
P0_1
P0_2
P0_3
P1_5
P1_4
P1_3
P1_2
P0_5
P0_4
P0_7
P3_7
P0_0
P3_5
P1_0
P2_7
P3_5
P3_0
P3_1
P0_6
P2_6
P3_6
P3_4
P3_0
P3_1
P0_6
P1_7
P4_1
P4_0
/XRES
V3.3_EXT
IOREF
P1_1P1_0
P3_1
P0_6
/XRES
P3_0
P4_VDD
P4_VDD
VBUS
P4_VDD
VIN
P4_VDD
P4_VDD
J4
8x1 RECP
1
2
3
4
5
6
7
8
J5
6X1 CONN FEMALE
1
2
3
4
5
6
0603
R9
2.2K
SOD123
D4
J2
9x2 RECP
1 2
3 4
5 6
7 8
910
11 12
13 14
15 16
17 18
TVS4
18V 350W BI
J1
8x1 RECP
1
2
3
4
5
6
7
8
J12
3x2 RECPT
1 2
3 4
5 6
J3
10X1 RECP
1
2
3
4
5
6
7
8
9
10
0603
R8
2.2K
PSoC 5LP GPIO Extension Header
NO LOAD NO LOAD NO LOAD
P5LP0_0
P5LP1_2
P5LP3_5P5LP3_4
P5LP3_0
P5LP0_1
P5LP3_6 P5LP3_7
P5LP12_7P5LP12_6
P5LP_VDD
TP3
BLACK
TP5
BLACK
TP6
BLACK
TP4
BLACK
J8
6x2 RECPT
1 2
3 4
5 6
7 8
109
1211
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 120
A.2 Pin Assignment Table
This section provides the pin map of the headers and their usage.
A.2.1 Arduino Compatible Headers (J1, J2, J3, J4, and J12)
J1
Pin Kit Signal Description
J1_01 VIN Input voltage to the board
J1_02 GND GND
J1_03 GND GND
J1_04 5V 5 V voltage
J1_05 3.3V 3.3 V voltage
J1_06 RESET /XRES
J1_07 IOREF I/O voltage reference
J1_08 NC Not connected
J2
Pin PSoC 4 Signal PSoC 4 Description Pin PSoC 4 Signal PSoC 4 Description
J2_01 P2[0] A0 (SARADC input) J2_02 P0[2] Comparator 2+
J2_03 P2[1] A1 (SARADC input) J2_04 P0[3] Comparator 2–
J2_05 P2[2] A2 (SARADC input) J2_06 VDD VDD
J2_07 P2[3] A3 (SARADC input) J2_08 P1[5] Opamp 2+
J2_09 P2[4] A4 (SARADC input) J2_10 P1[4] Opamp 2–
J2_11 P2[5] A5 (SARADC input) J2_12 P1[3] Opamp 2out
J2_13 P0[0] Comparator 1+ J2_14 GND GND
J2_15 P0[1] Comparator 1– J2_16 P1[2] Opamp 1out
J2_17 P1[0] Opamp 1+ J2_18 P1[1] Opamp 1–
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 121
J3
Pin PSoC 4 Signal PSoC 4 Description
J3_01 P2[6] D8
J3_02 P3[6] D9(PWM)
J3_03 P3[4] D10(PWM/SS)
J3_04 P3[0] D11(PWM/MOSI)
J3_05 P3[1] D12(MISO)
J3_06 P0[6] D13(SCK)
J3_07 GND GND
J3_08 P1[7] AREF
J3_09 P4[1] SDA
J3_10 P4[0] SCL
J4
Pin PSoC 4 Signal PSoC 4 Description
J4_01 P0[4] D0(RX)
J4_02 P0[5] D1(TX)
J4_03 P0[7] D2
J4_04 P3[7] D3(PWM)
J4_05 P0[0] D4
J4_06 P3[5] D5(PWM)
J4_07 P1[0] D6(PWM)
J4_08 P2[7] D7
J12
Pin Kit Signal PSoC 4 Description
J12_01 P3[1] MISO
J12_02 PSoC 4_VDD VDD
J12_03 P0[6] SCK
J12_04 P3[0] MOSI
J12_05 /XRES PSoC 4 RESET
J12_06 GND GND
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 122
A.2.2 Digilent Pmod Cards Support Header (J5)
J5
Pin Kit Signal PSoC 4 Description
(Default Pmod Signals)
J5_01 P3[5] SPI_SS (multiplex with J4_06)
J5_02 P3[0] SPI_MOSI
J5_03 P3[1] SPI_MISO
J5_04 P0[6] SPI_SCK
J5_05 GND GND
J5_06 VDD VCC
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 123
A.2.3 PSoC 5LP GPIO Header (J8)
J8 is a 2×6 header that connects PSoC 5LP pins to support GPIO controls for custom PSoC 5LP projects.
A.3 Program and Debug Headers
A.3.1 PSoC 4 Direct Program/Debug Header (J6)
A.3.2 PSoC 5LP Direct Program/Debug Header (J7)
J8
Pin PSoC 5LP Signal PSoC 5LP Description Pin PSoC 5LP
Signal PSoC 5LP Description
J8_01 PSoC 5LP_VDD VDD J8_02 P1[2] Digital I/O
J8_03 P0[0] Delta Sigma ADC + input J8_04 P0[1] Delta Sigma ADC – input
J8_05 P3[4] SAR – input J8_06 P3[5] SAR + input
J8_07 P3[6] Buffered VDAC J8_08 P3[7] Buffered VDAC
J8_09 P12[6] UART RX J8_10 P12[7] UART TX
J8_11 GND GND J8_12 P3[0] IDAC output
J6
Pin PSoC 5LP
Signal
PSoC 4
Signal Description Pin PSoC 5LP
Signal
PSoC 4
Signal Description
J6_01 VDD VDD VCC J6_02 P2[0] P3[2] TMS/SWDIO
J6_03 GND GND GND J6_04 P2[1] P3[3] TCLK/SWCLK
J6_05 GND GND GND J6_06 P2[2] NC TDO/SWO
J6_07 NC GND GND J6_08 P2[3] NC TDI
J6_09 GND GND GND J6_10 P2[4] XRES RESET
J7
Pin PSoC 5LP
Signal Description Pin PSoC 5LP
Signal Description
J7_01 VDD VCC J7_02 P1[0] TMS/SWDIO
J7_03 GND GND J7_04 P1[1] TCLK/SWCLK
J7_05 GND GND J7_06 P1[3] TDO/SWO
J7_07 GND GND J7_08 P1[4] TDI
J7_09 GND GND J7_10 XRES RESET
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 124
A.4 Use of Zero-ohm Resistors and No Load
A.5 Error in Firmware/Status Indication in Status LED
Note: LED status is not applicable when a custom project is running in PSoC 5LP.
Unit Resistor Usage
Power supply R2 Solder zero-ohm resistors to access voltage from VBUS (USB).
I2C connection between PSoC 5LP
and PSoC 4 R24 and R25
Unsolder the resistors to communicate with an external PSoC
using the PSoC 5LP. Removing these will disable the PSoC 4 I2C
communication with the PSoC 5LP device.
PSoC 4/external PSoC program/
debug header
R32, R33, and
R34
Unsolder the resistors to disconnect SWD lines from the PSoC 4.
Use J6 to connect and program an external PSoC. Removing these
will disable PSoC 4 programming by the PSoC 5LP device.
Protection circuit R46 Solder zero-ohm resistors to bypass the entire protection circuitry.
CapSense tuning circuitry R1
Used when RBleed mode of the CSD is used. To use this feature,
you must populate an Rbleed resistor. Refer to the CapSense com-
ponent datasheet.
CapSense shield setting R44, R45 Unsolder R45, which connects the shield to ground and solder R44
with zero-ohm resistors to connect Vref via P0_1.
PSoC 4 R4, R6 Unsolder R4 to remove supply to VTARG and solder zero-ohm
resistors R6 to supply P4_VDD with VDD instead of J13.
PSoC 5LP programmer/debugger R11, R12, R14,
R15, R16 For future use.
R5 Unsolder the zero-ohm resistor to cut the VDD supply to PSoC 5LP.
R7 For future use.
User Indication Scenario Action Required by user
1LED blinks at a fast rate
(ON Time = 0.25s, OFF Time = 0.25s)
Bootloadable file
is corrupt
Bootload the *.cyacd file over the USB interface,
which is shipped with PSoC Programmer using the
Bootloader Host GUI shipped with PSoC Creator. The
files are located in the PSoC Programmer root instal-
lation directory.
2LED blinks at a slow rate
(ON Time = 1.5s, OFF Time = 1.5s)
Entered Boot-
loader by press-
ing the PSoC 4
Reset switch
a) Unplug power and plug it in again if you entered
this mode by mistake; the LED gives the indication.
b) If the mode entry was intentional, bootload the new
*.cyacd file using the Bootloader Host tool shipped
with PSoC Creator.
3 LED glows steadily
Programmer appli-
cation is running
successfully
USB is enumerated successfully and the programmer
is up and running.The PSoC 4 device can now be pro-
grammed any time using the onboard PSoC 5LP pro-
grammer.
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 125
A.6 Bill of Materials (BOM)
No. Qty Reference Value Description Manufacturer Mfr Part Number
1
PCB,3.32"x2.1" CAF resistant High Tg
ENIG finish, 4 layer, Color = RED, Silk =
WHITE.
Cypress
2 1 C1 2200 pFd CAP CER 2200PF 50V 5% NP0 0805 Murata GRM2165C1H222JA0
1D
312
C2,C7,C12,C14,C15,C
17,C20,C21,C22,C24,
C25,C27
0.1 uFd CAP .1UF 16V CERAMIC Y5V 0402 Panasonic - ECG ECJ-0EF1C104Z
411
C3,C5,C8,C10,C11,C1
3,C18,C19,C23,C26,C
28
1.0 uFd CAP CERAMIC 1.0UF 25V X5R 0603
10% Taiyo Yuden TMK107BJ105KA-T
5 1 C4 10 uF 25V CAP TANT 10UF 25V 10% 1210 AVX Corporation TPSB106K025R1800
6 1 C6 22 uF 16V CAP TANT 22UF 16V 10% 1210 AVX Corporation TPSB226K016R0600
7 1 C9 10000 pFd CAP CER 10000PF 50V 5% NP0 0805 Murata GRM2195C1H103JA0
1D
8 1 C16 0.01 uFd CAP 10000PF 16V CERAMIC 0402
SMD Panasonic - ECG ECJ-0EB1C103K
96D1,D2,D4,D11,D12,D1
3MBR05 DIODE SCHOTTKY 0.5A 20V SOD-
123
Fairchild Semicon-
ductor MBR0520L
10 1 D3 Power LED
Amber LED AMBER 591NM DIFF LENS 2012 Sharp Microelectron-
ics LT1ZV40A
11 1 D5 2V Zener DIODE ZENER 2V 500MW SOD123 Diodes Inc BZT52C2V0-7-F
12 3 D6, D7, D8 ESD diode SUPPRESSOR ESD 5VDC 0603 SMD Bourns Inc. CG0603MLC-05LE
13 1 D9 RGB LED LED RED/GREEN/BLUE PLCC4 SMD Cree, Inc. CLV1A-FKB-
CJ1M1F1BB7R4S3
14 1 D10 Status LED
Green LED GREEN CLEAR 0805 SMD Chicago Miniature CMD17-21VGC/TR8
15 1 F1 FUSE PTC Resettable Fuses 15Volts
100Amps Bourns MF-MSMF050-2
16 2 J1, J4 8x1 RECP CONN HEADER FEMALE 8POS .1"
GOLD
Sullins Connector
Solutions PPPC081LFBN-RC
17 1 J2 9x2 RECP CONN HEADER FMAL 18PS.1" DL
GOLD
Sullins Connector
Solutions PPPC092LFBN-RC
18 1 J3 10x1 RECP CONN HEADER FMALE 10POS .1"
GOLD
Sullins Connector
Solutions PPPC101LFBN-RC
19 1 J6 50MIL
KEYED SMD
CONN HEADER 10 PIN 50MIL KEYED
SMD Samtec FTSH-105-01-L-DV-K
20 1 J8 6x2 RECP CONN HEADER FMAL 12PS.1" DL
GOLD
Sullins Connector
Solutions PPPC062LFBN-RC
21 1 J9 3p_jumper CONN HEADER VERT SGL 3POS
GOLD 3M 961103-6404-AR
22 1 J10 USB Mini B CONN USB MINI AB SMT RIGHT
ANGLE TE Connectivity 1734035-2
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 126
23 1 J13 2p_jumper CONN HEADER VERT SGL 2POS
GOLD 3M 961102-6404-AR
24 3 Q1,Q2,Q3 PMOS MOSFET P-CH 30V 3.8A SOT23-3 Diodes Inc DMP3098L-7
25 1 R3 560 RES 560 1/8W 5% 0805 SMD Panasonic - ECG ERJ-6GEYJ561V
26 12
R4,R11,R12,R14,R15,
R16,R24,R25,R32,R33
,R34,R45
ZERO RES 0.0 1/10W 0603 SMD Panasonic-ECG ERJ-3GEY0R00V
27 1 R5 ZERO RES 0.0 1/8W 0805 SMD Panasonic-ECG ERJ-6GEY0R00V
28 4 R8,R9,R22,R23 2.2K RES 2.2 k 1/10W 5% 0603 SMD Panasonic - ECG ERJ-3GEYJ222V
29 2 R10,R41 4.7K RES 4.7 k 1/10W 5% 0603 SMD Panasonic-ECG ERJ-3GEYJ472V
30 1 R13 100K RES 100 k 1/10W 5% 0402 SMD Panasonic - ECG ERJ-2GEJ104X
31 5 R17,R18,R19,R20,R21 560 RES 560 1/10W 5% 0603 SMD Panasonic-ECG ERJ-3GEYJ561V
32 2 R26, R27 22E RES 22 1/10W 1% 0603 SMD Panasonic - ECG ERJ-3EKF22R0V
33 1 R28 2.2K RES 2.2 k 1/8W 5% 0805 SMD Panasonic - ECG ERJ-6GEYJ222V
34 2 R29,R30 1.5K RES 1.5 k 1/8W 5% 0805 SMD Panasonic - ECG ERJ-6GEYJ152V
35 1 R31 330 RES 330 1/8W 5% 0805 SMD Panasonic - ECG ERJ-6GEYJ331V
36 1 R35 232 RES 232 1/10W 1% 0603 SMD Panasonic - ECG ERJ-3EKF2320V
37 1 R36 120 RES 120 1/10W 1% 0603 SMD Panasonic - ECG ERJ-3EKF1200V
38 2 R37,R39 1.5K RES 1.5K 1/10W 5% 0603 SMD Panasonic - ECG ERJ-3GEYJ152V
39 2 R38,R40 3K RES 3.0K 1/10W 5% 0603 SMD Panasonic - ECG ERJ-3GEYJ302V
40 1 R42 1K RES 1K 1/8W 5% 0805 SMD Panasonic - ECG ERJ-6GEYJ102V
41 1 R43 442 RES 442 1/10W 1% 0603 SMD Panasonic - ECG ERJ-3EKF4420V
42 2 SW1,SW2 SW PUSH-
BUTTON
SWITCH TACTILE SPST-NO 0.05A
12V Panasonic - ECG EVQ-PE105K
43 1 TP5 BLACK TEST POINT PC MINI .040"D Black Keystone Electronics 5001
44 2 TVS1,TVS2 5V 350W TVS UNIDIR 350W 5V SOD-323 Dioded Inc. SD05-7
45 1 TVS4 18V 350W TVS DIODE 18V 1CH BI SMD Bourns Inc. CDSOD323-T18C
46 1 U1 NCP1117DT
ARKG NCP1117DTARKG ON Semiconductor NCP1117DTARKG
47 1 U2
PSoC 4
(CY8C4245A
XI-483)
44TQFP PSoC4A target chip Cypress Semicon-
ductor CY8C4245AXI-483
48 1 U3
PSoC 5LP
(CY8C5868L
TI-LP039 )
68QFN PSoC 5LP chip for USB debug
channel and USB-Serial interface
Cypress Semicon-
ductor CY8C5868LTI-LP039
No Load Components
49 1 C29 1.0 uFd CAP CERAMIC 1.0UF 25V X5R 0603
10% Taiyo Yuden TMK107BJ105KA-T
No. Qty Reference Value Description Manufacturer Mfr Part Number
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 127
A.7 Regulatory Compliance Information
The CY8CKIT-042 PSoC 4 Pioneer Kit has been tested and verified to comply with the following
electromagnetic compatibility (EMC) regulations:
EN 55022:2010 Class A - Emissions
EN 55024:2010 Class A - Immunity
50 1 J5 6X1 RECP
RA
CONN FEMALE 6POS .100" R/A
GOLD
Sullins Connector
Solutions PPPC061LGBN-RC
51 1 J7 50MIL
KEYED SMD
CONN HEADER 10 PIN 50MIL KEYED
SMD Samtec FTSH-105-01-L-DV-K
52 1 J11 2 PIN HDR CONN HEADER FEMALE 2POS .1"
GOLD
Sullins Connector
Solutions PPPC021LFBN-RC
53 1 J12 3x2 RECPT CONN HEADER FMAL 6PS .1" DL
GOLD
Sullins Connector
Solutions PPPC032LFBN-RC
54 5 R1,R2,R7,R44,R46 ZERO RES 0.0 1/10W 0603 SMD Panasonic-ECG ERJ-3GEY0R00V
55 1 R6 ZERO RES 0.0 1/8W 0805 SMD Panasonic-ECG ERJ-6GEY0R00V
56 2 TP1,TP2 RED TEST POINT PC MINI .040"D RED Keystone Electronics 5000
57 3 TP3,TP4,TP6 BLACK TEST POINT PC MINI .040"D Black Keystone Electronics 5001
58 1 TVS3 5V 350W TVS UNIDIR 350W 5V SOD-323 Dioded Inc. SD05-7
Install on Bottom of PCB As per the Silk Screen in the Corners
59 4 N/A N/A BUMPON CYLINDRICAL.312X.215
BLACK 3M SJ61A6
Special Jumper Installation Instructions
60 1J9
Install jumper
across pins 1
and 2
Rectangular Connectors MINI JUMPER
GF 6.0MM CLOSE TYPE BLACK Kobiconn 151-8010-E
61 1J13
Install jumper
across pins 1
and 2
Rectangular Connectors MINI JUMPER
GF 6.0MM CLOSE TYPE BLACK Kobiconn 151-8010-E
Label
62 1 N/A N/A
LBL, Kit Product Identification Label,
Vendor Code, Datecode, Serial Number
CY8CKIT-042 Rev** (YYWWV-
VXXXXX)
Cypress Semicon-
ductor
63 1 N/A N/A LBL, PCBA Anti-Static Warning, 10mm
X 10mm
Cypress Semicon-
ductor
64 1 N/A N/A Assembly Adhesive Label, Manufactur-
ing ID
Cypress Semicon-
ductor
65 1 N/A N/A Kit QR code Cypress Semicon-
ductor
No. Qty Reference Value Description Manufacturer Mfr Part Number
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 128
A.8 Migrating projects across different Pioneer series kits
All Cypress Pioneer series kits are Arduino Uno compatible and have some common on-board
peripherals such as RGB LED, CapSense and User Switch. However, the pin mapping in each of the
boards is different due to differences in pin functions of the PSoC device used. This guide lists the
pin maps of the Pioneer series kits to allow for easy migration of projects across different kits.
In some cases, the pins available on the Pioneer kit headers are a superset of the standard Arduino
Uno pins. For example J2 contains only 1 row of pins on the Arduino Uno pinout while it contains 2
rows of pins on many of the Pioneer series kits.
Figure A-1. Pioneer series kits pin map
Pioneer series kits
J1 J2
J3 J4
18 1
2
11 8
10
17
18
11
12
CY8CKIT-040
CY8CKIT-042-BLE
CY8CKIT-042 & CY8CKIT-044
6x1 header
6x2 header
9x2 header
Arduino compatible
I/O headers
Arduino compatible
power header
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 129
A.8.1 Arduino Uno Compatible Headers
J1 Arduino Compatible Header Pin Map
Pin # Arduino Pin Pioneer series kits
CY8CKIT-042 CY8CKIT-040 CY8CKIT-042-BLE CY8CKIT-044
1 VIN VIN VIN VIN VIN
2 GND GND GND GND GND
3 GND GND GND GND GND
4 5V V5.0 V5.0 V5.0 V5.0
5 3.3V V3.3 V3.3 V3.3 V3.3
6 RESET RESET RESET RESET RESET
7 IOREF P4.VDD P4.VDD BLE.VDD P4.VDD
8NCNCNCNCNC
J2 Arduino Compatible Header Pin Map
Pin # Arduino Pin Pioneer series kits
CY8CKIT-042 CY8CKIT-040 CY8CKIT-042-BLE CY8CKIT-044
1 A0 P2[0] P0[0] P3[0] P2[0]
2– P0[2]* P2[0] P2[6]*
3 A1 P2[1] P0[1] P3[1] P2[1]
4– P0[3]*P2[1]*P6[5]*
5 A2 P2[2] P0[2]*P3[2] P2[2]
6– P4_VDD P2[2]*P0[6]*
7 A3 P2[3] P0[4]*P3[3] P2[3]
8– P1[5]*P2[3]*P4[4]*
9 A4 P2[4] P1[3] P3[4] P2[4]
10 – P1[4]*P2[4]*P4[5]*
11 A5 P2[5] P1[2] P3[5] P2[5]
12 – P1[3]*P2[5]*P4[6]*
13 – P0[0] P0[0]
14 – GND GND
15 – P0[1] P0[1]
16 – P1[2]*––
P3[4]*
17 – P1[0] P0[7]*
18 – P1[1]*––
P3[5]*
* These pins are also used for on-board peripherals. See the tables in the On-Board Peripherals section
below for details.
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 130
J3 Arduino Compatible Header Pin Map
Pin # Arduino Pin Pioneer series kits
CY8CKIT-042 CY8CKIT-040 CY8CKIT-042-BLE CY8CKIT-044
1 D8 P2[6] P1[4] P0[5] P0[2]
2 D9 P3[6] P1[5] P0[4] P0[3]
3 D10 P3[4] P1[6] P0[2] P2[7]
4D11 P3[0] P1[1]*P0[0] P6[0]
5 D12 P3[1] P3[1] P0[1] P6[1]
6 D13 P0[6] P1[7] P0[3] P6[2]
7 GND GND GND GND GND
8 AREF P1[7] NC VREF P1[7]
9 SDA P4[1] P1[3] P3[4] P4[1]
10 SCL P4[0] P1[2] P3[5] P4[0]
* These pins are also used for on-board peripherals. See the tables in the On-Board Peripherals section
below for connection details.
J4 Arduino Compatible Header Pin Map
Pin # Arduino Pin Pioneer series kits
CY8CKIT-042 CY8CKIT-040 CY8CKIT-042-BLE CY8CKIT-044
1 D0 P0[4] P0[5] P1[4] P3[0]
2 D1 P0[5] P0[6] P1[5] P3[1]
3D2 P0[7]*P0[7] P1[6] P1[0]
4 D3 P3[7] P3[2]*P1[7] P1[1]
5 D4 P0[0] P0[3] P1[3] P1[2]
6 D5 P3[5] P3[0] P1[2] P1[3]
7 D6 P1[0] P1[0] P1[1] P5[3]
8 D7 P2[7] P2[0]*P1[0] P5[5]
* These pins are also used for on-board peripherals. See the tables in the On-Board Peripherals section
below for connection details.
QEIERESS' II “111qu
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 131
A.8.2 On-Board Peripherals
CapSense Pin Map
Pin # Description
Pioneer series kits
CY8CKIT-042
(Linear Slider) CY8CKIT-040 CY8CKIT-042-BLE
(Linear Slider)
CY8CKIT-044
(Gesture Pad)
1 CSS1 P1[1] P2[1] P4[4]
2 CSS2 P1[2] P2[2] P4[5]
3 CSS3 P1[3] P2[3] P4[6]
4 CSS4 P1[4] P2[4] P3[4]
5 CSS5 P1[5] P2[5] P3[5]
6 CMOD P4[2] P0[4] P4[0] P4[2]
7 CTANK P4[3] P0[2] P4[1] P4[3]
Proximity header Pin Map
Pin # Description Pioneer series kits
CY8CKIT-042 CY8CKIT-040 CY8CKIT-042-BLE CY8CKIT-044
1PROXIMITY P2[0] P2[0] P3[7]
2 –––P3[6]
RGB LED Pin Map
Pin # Color Pioneer series kits
CY8CKIT-042 CY8CKIT-040 CY8CKIT-042-BLE CY8CKIT-044
1 Red P1[6] P3[2] P2[6] P0[6]
2 Green P0[2] P1[1] P3[6] P2[6]
3 Blue P0[3] P0[2] P3[7] P6[5]
User Switch Pin Map
Pin # Description Pioneer series kits
CY8CKIT-042 CY8CKIT-040 CY8CKIT-042-BLE CY8CKIT-044
1 SW2 P0[7] P2[7] P0[7]
@chREss
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 132
Revision History
Document Revision History
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide Revision History
Document Title: CY8CKIT-042 PSoC® 4 Pioneer Kit Guide
Document Number: 001-86371
Revision ECN# Issue Date Origin of
Change Description of Change
** 3978908 04/23/2013 ANCY Initial version of kit guide.
*A 3981609 04/25/2013 ANCY Minor changes across the guide.
*B 4008979 05/23/2013 RKAD
Minor changes across the guide.
Updated Introduction chapter on page 7:
Updated “Kit Contents” on page 7:
Updated Figure 1-1.
Updated Advanced Topics chapter on page 65:
Added “PSoC 5LP Factory Program Restore Instructions” on page 100.
*C 4107338 08/23/2013 SASH
Minor changes across the guide.
Updated Code Examples chapter on page 43:
Updated Figure 5-2.
Updated Figure 5-3.
*D 4202835 11/26/2013 SASH
Updated PSoC Creator images.
Added figure captions.
Updated Introduction chapter on page 7:
Updated “Additional Learning Resources” on page 10:
Updated PSoC Creator training web link.
Updated Code Examples chapter on page 43:
Modified the CapSense code example.
*E 4757883 05/07/2015 SASH /
MSUR
Updated Introduction chapter on page 7:
Updated “Additional Learning Resources” on page 10:
Updated description.
Updated “PSoC Creator Code Examples” on page 12:
Updated Figure 1-4.
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 133
Revision History
*E (cont.) 4757883 05/07/2015 SASH /
MSUR
Updated Software Installation chapter on page 14:
Updated “Install Kit Software” on page 14:
Updated description.
Updated “Install Kit Software” on page 14:
Updated description.
Updated “Develop Code Fast and Easy with Code Examples” on
page 17:
Updated Figure 2-3.
Updated Figure 2-4.
Updated “Open an Example Project in PSoC Creator” on page 19:
Updated Figure 2-6.
Updated Kit Operation chapter on page 17:
Updated “Pioneer Kit USB Connection” on page 18:
Updated Ta b l e 3 - 1 :
Updated entire table.
Removed figure “KitProg Driver Installation”.
Updated Figure 3-2.
Updated “Programming and Debugging PSoC 4” on page 19:
Updated “Using CY8CKIT-002 MiniProg3 Programmer and Debugger” on
page 21:
Updated Figure 3-8.
Updated description.
Updated Hardware chapter on page 27:
Updated “Functional Description” on page 30:
Updated “Arduino Compatible Headers (J1, J2, J3, J4, and J12 - unpopu-
lated)” on page 36:
Updated description.
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide Revision History (continued)
Document Title: CY8CKIT-042 PSoC® 4 Pioneer Kit Guide
Document Number: 001-86371
Revision ECN# Issue Date Origin of
Change Description of Change
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 134
Revision History
*E (cont.) 4757883 05/07/2015 SASH /
MSUR
Updated Code Examples chapter on page 43:
Updated description.
Updated “Blinking LED” on page 47:
Updated “Hardware Connections” on page 47:
Updated Ta b l e 5 - 1 :
Updated details in “Pin Name” column.
Updated Figure 5-9.
Updated “Flow Chart” on page 48:
Updated description.
Updated “PWM” on page 49:
Updated “Hardware Connections” on page 49:
Updated Ta b l e 5 - 2 :
Updated details in “Pin Name” column.
Updated Figure 5-13.
Updated “Deep Sleep” on page 51:
Updated “Hardware Connections” on page 51:
Updated Ta b l e 5 - 3 :
Updated details in “Pin Name” column.
Updated Figure 5-16.
Updated “CapSense” on page 54:
Updated “CapSense (Without Tuning)” on page 54:
Updated “Hardware Connections” on page 55:
Updated Ta b l e 5 - 4 :
Updated details in “Pin Name” column.
Updated Figure 5-20.
Updated “CapSense (With Tuning)” on page 57:
Updated “Launching Tuner GUI” on page 58:
Updated Figure 5-24.
Updated Figure 5-25.
Updated “Verify Output” on page 61:
Updated description.
Updated Figure 5-27.
Updated Figure 5-28.
Updated Figure 5-29.
Updated Figure 5-30.
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide Revision History (continued)
Document Title: CY8CKIT-042 PSoC® 4 Pioneer Kit Guide
Document Number: 001-86371
Revision ECN# Issue Date Origin of
Change Description of Change
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 135
Revision History
*E (cont.) 4757883 05/07/2015 SASH /
MSUR
Updated Advanced Topics chapter on page 65:
Updated “Using PSoC 5LP as a USB-UART Bridge” on page 65:
Updated description.
Updated Figure 6-1.
Updated Figure 6-4.
Updated Figure 6-6.
Updated Figure 6-7.
Updated Figure 6-8.
Updated Figure 6-9.
Updated “Using PSoC 5LP as USB-I2C Bridge” on page 79:
Updated description.
Updated Figure 6-21.
Updated Figure 6-24.
Updated Figure 6-26.
Updated Figure 6-27.
Added Figure 6-28.
Updated Figure 6-29.
Updated “Developing Applications for PSoC 5LP” on page 88:
Updated “Building a Bootloadable Project for PSoC 5LP” on page 88:
Updated description.
Updated Figure 6-37.
Updated Figure 6-41.
Added Figure 6-45.
Updated Figure 6-46.
Updated “Building a Normal Project for PSoC 5LP” on page 97:
Updated Figure 6-51.
Updated “PSoC 5LP Factory Program Restore Instructions” on page 100:
Updated “PSoC 5LP is Programmed with a Bootloadable Application” on
page 100:
Updated “Restore PSoC 5LP Factory Program Using PSoC Program-
mer” on page 100:
Updated description.
Updated “PSoC 5LP is Programmed with a Standard Application” on
page 105:
Updated description.
Added “Using µC/Probe Tool” on page 107.
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide Revision History (continued)
Document Title: CY8CKIT-042 PSoC® 4 Pioneer Kit Guide
Document Number: 001-86371
Revision ECN# Issue Date Origin of
Change Description of Change
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I 136
Revision History
*E (cont.) 4757883 05/07/2015 SASH /
MSUR
Updated Appendix chapter on page 116:
Updated “CY8CKIT-042 Schematics” on page 116:
Updated entire section.
Updated “Use of Zero-ohm Resistors and No Load” on page 124:
Updated table.
Added “Migrating projects across different Pioneer series kits” on
page 128.
*F 4897811 09/14/2015 SRDS Updated images and fixed hyperlinks.
*G 5201185 04/01/2016 RKAD Sunset review; no content updates
*H 5740267 05/17/2017 AESATMP8 Updated logo and Copyright.
*I 6111693 03/27/2018 SAGA
Update images. Minor content updates throughout the document
Updated schematics
Added “Using the Micrium® µC/Probe® Projects” on page 46
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide Revision History (continued)
Document Title: CY8CKIT-042 PSoC® 4 Pioneer Kit Guide
Document Number: 001-86371
Revision ECN# Issue Date Origin of
Change Description of Change