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
Copyrights
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.
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I
2
Contents
Safety Information
1. Introduction
1.1
1.2
1.3
1.4
5
7
1.5
Kit Contents .................................................................................................................7
PSoC Creator™...........................................................................................................9
Getting Started.............................................................................................................9
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
Documentation Conventions......................................................................................13
2. Software Installation
2.1
2.2
14
Install Kit Software .....................................................................................................14
Uninstall Software......................................................................................................16
3. Kit Operation
3.1
3.2
3.3
3.4
3.5
17
Pioneer Kit USB Connection......................................................................................18
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
USB-UART Bridge .....................................................................................................22
USB-I2C Bridge .........................................................................................................24
Updating the Onboard Programmer Firmware ..........................................................25
4. Hardware
4.1
4.2
4.3
27
Board Details .............................................................................................................27
Theory of Operation...................................................................................................29
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
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I
3
Contents
5. Code Examples
5.1
5.2
5.3
43
5.4
5.5
5.6
Using the Kit Code Examples ....................................................................................43
Using the Micrium® µC/Probe® Projects ..................................................................46
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
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
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
CapSense ..................................................................................................................54
5.6.1 CapSense (Without Tuning) ...........................................................................54
5.6.2 CapSense (With Tuning) ................................................................................57
6. Advanced Topics
6.1
6.2
6.3
6.4
6.5
65
Using PSoC 5LP as a USB-UART Bridge .................................................................65
Using PSoC 5LP as USB-I2C Bridge ........................................................................79
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
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
Using µC/Probe Tool ...............................................................................................107
6.5.1 CapSense Code Example............................................................................108
6.5.2 PWM Code Example....................................................................................114
A. Appendix
A.1
A.2
A.3
A.4
A.5
A.6
A.7
A.8
116
CY8CKIT-042 Schematics.......................................................................................116
Pin Assignment Table ..............................................................................................120
Program and Debug Headers ..................................................................................123
Use of Zero-ohm Resistors and No Load ................................................................124
Error in Firmware/Status Indication in Status LED ..................................................124
Bill of Materials (BOM) .............................................................................................125
Regulatory Compliance Information ........................................................................127
Migrating projects across different Pioneer series kits ............................................128
Revision History
132
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I
4
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.
CY8CKIT-042 PSoC® 4 Pioneer Kit Guide, Doc. # 001-86371 Rev. *I
5