background image

CY8CKIT-043 PSoC® 4 M-Series Prototyping Kit Guide, Doc. #: 001-97606 Rev. **

33

5.

Code Examples

This chapter explains the code example provided along with the PSoC 4 M-Series Prototyping Kit as
well as how to use the built-in PSoC Creator examples with the kit. To access the code example,
download and install the CY8CKIT-043 PSoC 4 M-Series Prototyping Kit setup file from

www.cypress.com/CY8CKIT-043

. After installation, the code example will be available in the

Firmware

 folder in the installation location. 

For more code examples, visit the 

PSoC 3, PSoC 4, and PSoC 5 code examples page

which lists all

PSoC Creator code examples available across application notes, kits, and PSoC Creator.

5.1

Using the Kit Code Example

Follow these steps to open and use the code example provided with the kit.
1. Launch PSoC Creator from 

Start 

All Programs

 > 

Cypress

 > 

PSoC Creator<version>

 >

 

PSoC Creator <version>

.

2. On the 

Start Page

, click 

CY8CKIT-043

 under 

Examples and Kits

 > 

Kits

. The code example 

CE97634 PSoC 4 Breathing LED

, shipped with the kit, appears (see 

Figure 5-1

).

3. Click on the example project and save it at a desired location. 

Summary of Contents for CY8CKIT-043

Page 1: ...CY8CKIT 043 PSoC 4 M Series Prototyping Kit Guide Doc 001 97606 Rev Cypress Semiconductor 198 Champion Court San Jose CA 95134 1709 Phone USA 1 800 858 1810 Phone Intnl 1 408 943 2600 www cypress com...

Page 2: ...ten permission of Cypress Disclaimer CYPRESS MAKES NO WARRANTY OF ANY KIND EXPRESS OR IMPLIED WITH REGARD TO THIS MATERIAL INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FI...

Page 3: ...Software 13 2 3 Uninstall Software 15 3 Kit Operation 16 3 1 Theory of Operation 16 3 2 KitProg 17 3 3 Programming and Debugging the PSoC 4 Target Device 17 3 3 1 Programming Using PSoC Creator 17 3...

Page 4: ...e Examples 33 5 1 Using the Kit Code Example 33 5 2 Using Built in PSoC Creator Code Examples with the Kit 37 Appendix 42 PSoC 4 M Series Prototyping Kit Schematics 42 Programming the PSoC 4 M Series...

Page 5: ...om 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 Th...

Page 6: ...is not available use appropriate ESD protection by wearing an antistatic wrist strap attached to the chassis ground any unpainted metal surface on your board when handling parts Handling Boards The C...

Page 7: ...n open footprint breakout board to maximize the end utility of the PSoC 4200M device This kit provides a low cost alternative to device samples while providing a platform to easily develop and integra...

Page 8: ...uild 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...

Page 9: ...10 In the Find Example Project dialog shown in Figure 1 4 you have several options Filter for examples based on architecture or device family that is PSoC 3 PSoC 4 or PSoC 5LP project name or keyword...

Page 10: ...tation Quick Start Guide This guide gives you the basics for developing PSoC Creator projects Simple Component example projects Choose File Example project These example projects demonstrate how to co...

Page 11: ...ogramming the kit using MiniProg3 and the bill of materials BOM 1 4 Additional Learning Resources Cypress provides a wealth of information at www cypress com to help you to select the right PSoC devic...

Page 12: ...tion embedded systems on Cypress Developer Community Forums 1 5 Technical Support If you have any questions our technical support team is happy to assist you You can create a support request on the Cy...

Page 13: ...e formats a CY8CKIT 043 Kit 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 Micros...

Page 14: ...Series Prototyping kit installer automatically installs the required software if it is not present on your computer Following are the required software a PSoC Creator 3 2 or later This software is als...

Page 15: ...ollowing location Install_Directory CY8CKIT 043 PSoC 4 M Series Prototyping Kit Default location Windows OS 64 bit C Program Files x86 Cypress CY8CKIT 043 PSoC 4 M Series Prototyping Kit Windows OS 32...

Page 16: ...features KitProg It is an onboard programmer debugger which enables the user to program and debug the target PSoC 4200M device It can also act as a USB UART and USB I2 C bridge When used as a standalo...

Page 17: ...ault this switch is not populated on board and the PSoC 4200M SWD lines are hard wried to the KitProg s SWD programming lines 10 pin program debug header This header provides support for program debug...

Page 18: ...If you want to open the example project provided with the kit follow the instructions in the Code Examples chapter on page 33 3 Select Build Build Project or press Shift F6 to build the project as sh...

Page 19: ...gram using PSoC Programmer 3 4 USB UART Bridge The KitProg can act as a USB UART bridge The UART lines between the KitProg and the target are hard wired on the board through the snappable area with UA...

Page 20: ...device U1 CY8C5868LTI LP039 KitProg headers J8 and J9 SWD connection J3 and J7 USB finger connector J6 EZ BLE PRoC module U4 footprint only One DPDT switch SW4 to select the SWD target device footprin...

Page 21: ...SDA P4_1 CMOD P4_2 CTANK P4_3 P4_4 P4_5 P4_6 KitProg TX P7_0 KitProg RX P7_1 P0_0 P0_1 P0_2 P0_3 WCO IN P0_4 WCO OUT P0_5 P0_6 SW1 P0_7 GND VDDD VDDIO GND P6_5 P6_4 P6_2 P6_1 P6_0 P2_7 P2_6 P2_5 P2_4...

Page 22: ...tal subsystems allow flexibility and in field tuning of the design For more information refer to the PSoC 4 web page and the PSoC 4200M Family Datasheet Figure 4 2 Schematic of PSoC 4 Target PSoC 4200...

Page 23: ...12_3 KP_P3_0 KP_P3_4 KP_P3_5 KP_P1_7 KP_P1_6 KP_P3_1 KP_VCCD KP_P12_5 KP_P0_4 KP_VCCD KP_P0_7 KP_P0_5 KP_P0_6 VDDD KP_VDDIO1 VDDA KP_P1_6 KP_P1_7 VSSD KP_P0_3 KP_P0_2 VSSD KP_XRES KP_XRES VTARG VBUS R...

Page 24: ...KitProg board by snapping the perforated edge between the two boards 2 Power the remaining prototyping board via any of the VDD or VTARG terminals 3 Place an ammeter in series with the VDD or VTARG c...

Page 25: ...oards 4 2 5 1 Functionality of J1 and J2 Headers Target Board The target board contains two dual inline headers J1 and J2 Both are 1 29 pin headers and include all of the I Os available on the PSoC 42...

Page 26: ...IO J1_13 P1 6 GPIO LED LED1 J1_14 P1 7 GPIO SAR BYPASS J1_15 P2 0 GPIO J1_16 P2 1 GPIO J1_17 P2 2 GPIO J1_18 P2 3 GPIO J1_19 P2 4 GPIO J1_20 P2 5 GPIO J1_21 P2 6 GPIO J1_22 P2 7 GPIO J1_23 P6 0 GPIO J...

Page 27: ...a low speed digital logic analyzer These headers also contain the KitProg bridge pins USB to UART and USB to I2C that can be used when the two boards are separated The J8 and J9 headers support 100 m...

Page 28: ...en this button is pressed the XRES lines of the PSoC 4200M and EZ BLE are connected to ground which in turn resets the devices Bootload the KitProg When this button is held down while plugging the Kit...

Page 29: ...Button 4 2 6 3 LEDs The PSoC 4 M Series Prototyping kit contains three LEDs The amber LED Indicates that the board is powered from the PCB USB connector This LED will not light when the board is powe...

Page 30: ...uired to interface an external 32 kHz crystal oscillator Note The crystal oscillator is not placed on the board it can be soldered on pins P0 5 and P0 4 Figure 4 14 System Capacitors Circuit Diagram 4...

Page 31: ...is not populated and the Kit Prog SWD connections are hardwired to PSoC 4200M through zero ohm resistors R18 and R16 Table 4 7 EZ BLE Connections To program the EZ BLE module using Kitprog follow thes...

Page 32: ...the zero ohms resistors R18 and R16 4 Move the DPDT switch to position A as shown in Figure 4 16 to program PSoC 4200M and to position B as shown in Figure 4 17 to program the EZ BLE module Figure 4 1...

Page 33: ...the Firmware folder in the installation location For more code examples visit the PSoC 3 PSoC 4 and PSoC 5 code examples page which lists all PSoC Creator code examples available across application no...

Page 34: ...s generated after a successful build process Figure 5 2 Build Example Project from PSoC Creator 5 Connect the PSoC 4 M Series Prototyping kit to the PC using the KitProg PCB USB port J6 as described i...

Page 35: ...opens the programming window if the device is not yet acquired Select KitProg and click the Port Acquire button as shown in Figure 5 4 Figure 5 4 Port Acquire 8 After the device is acquired it is sho...

Page 36: ...rogramming is successful the blue LED LED1 on the board should start displaying the breathing effect at approximately 1 Hz rate From the Workspace Explorer in PSoC Creator open the CE97634 PSoC 4 Brea...

Page 37: ...nd use the built in PSoC Creator examples 1 Launch PSoC Creator from Start All Programs Cypress PSoC Creator version PSoC Creator version 2 On the Start Page click Find Example Project under Examples...

Page 38: ...ind Examples Window 4 You can use any project that appears in the list with the kit As an example we will select the ADC_SAR_Seq_DieTemp_PSoC4 project and see how to use it with CY8CKIT 043 5 Select t...

Page 39: ...e in the range 0 to 1 024 V on a pin and sends the measured voltage and device die temperature over UART In addition the project controls the brightness of an LED using a PWM based on the value measur...

Page 40: ...3 make sure the device used is CY8C4247AZI M485 as shown in Figure 5 11 Build the project and program the kit as explained in Using the Kit Code Example on page 33 Figure 5 11 Device Selector Settings...

Page 41: ...program like PuTTY or HyperTerminal Refer to chapter 5 of the KitProg User Guide for details on how to configure and use the software with KitProg The UART used in the example uses con figuration prov...

Page 42: ...60252 01 CY8CKIT 043 PSoC 4 M Series Prototyping Kit B Title Size Document Number R CYPRESS SEMICONDUCTOR 2015 630 60252 01 CY8CKIT 043 PSoC 4 M Series Prototyping Kit B Title Size Document Number R...

Page 43: ...Kit B 3 3 Friday June 12 2015 Title Size Document Number R Date Sheet of CYPRESS SEMICONDUCTOR 2015 630 60252 01 CY8CKIT 043 PSoC 4 M Series Prototyping Kit B 3 3 Friday June 12 2015 Title Size Docum...

Page 44: ...Prog via the 5 pin SWD header or the 10 pin JTAG header To do this connect wires or a 5 pin 100 mil spaced header to J3 or a 10 pin JTAG header to J5 on the target board The PSoC 4 M Series Prototypin...

Page 45: ...5A 20V SOD 123 Fairchild Semicon ductor MBR0520L 9 1 F1 PTC Resetta ble Fuse FUSE PTC Resettable 0 50A 16V 1210 SMD Bel Fuse Inc 0ZCH0050FF2G 10 1 LED1 User LED BLUE LED BLUE CLEAR 0805 SMD Lite On In...

Page 46: ...29 1 C7 1 0 uFd CAP CERAMIC 1 0UF 25V X5R 0603 10 Taiyo Yuden TMK107BJ105KA T 30 1 J4 HDR 1x2 CONN HEADR BRKWAY 100 02POS STR TE Connectivity 9 146280 0 02 31 1 J5 50MILKEYED SMD CONN HEADER 10 PIN 50...

Page 47: ...47 Revision History CY8CKIT 043 PSoC 4 M Series Prototyping Kit Guide Revision History Document Title CY8CKIT 043 PSoC 4 M Series Prototyping Kit Guide Document Number 001 97606 Revision Issue Date O...

Reviews: