background image

40

CY8CKIT-050 PSoC® 5LP Development Kit Guide, Doc. # 001-65816 Rev. *E

Code Examples

5.5.2

Hardware Connections

This project uses the LCD for display; therefore, ensure that it is plugged into the port. No specific
hardware connections are required for this project because all connections are hard-wired on the
board. 

5.5.3

Verify Output

Build and program the code example, and reset the device. The LCD displays the status of the two
buttons as On/Off. The LCD also shows the slider touch position as a percentage. When you touch a
button, the LCD displays ON; when you remove the finger from the button, the LCD displays OFF.
When the slider is touched, the corresponding finger position is displayed as a percentage on the
LCD.

Figure 5-9.  CapSense Slider

Downloaded from 

Elcodis.com

 

electronic components distributor

 

Summary of Contents for CY8CKIT-050

Page 1: ...ment Kit Guide Doc 001 65816 Rev E Cypress Semiconductor 198 Champion Court San Jose CA 95134 1709 Phone USA 800 858 1810 Phone Intnl 408 943 2600 http www cypress com Downloaded from Elcodis com electronic components distributor ...

Page 2: ...ess Disclaimer CYPRESS MAKES NO WARRANTY OF ANY KIND EXPRESS OR IMPLIED WITH REGARD TO THIS MATE RIAL INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE Cypress reserves the right to make changes without further notice to the materials described herein Cypress does not assume any liability arising out of the application or use of any product...

Page 3: ...3 1 Programming PSoC 5LP Device 13 4 Hardware 17 4 1 System Block Diagram 17 4 2 Functional Description 18 4 2 1 Power Supply 18 4 2 1 1 Power Supply Jumper Settings 19 4 2 1 2 Grounding Scheme 20 4 2 1 3 Low Power Functionality 20 4 2 1 4 AC DC Adaptor Specifications 21 4 2 1 5 Battery Specifications 21 4 2 2 Programming Interface 21 4 2 2 1 On board Programming Interface 21 4 2 2 2 JTAG SWD Prog...

Page 4: ...37 5 3 Project IntensityLED 38 5 3 1 Project Description 38 5 3 2 Hardware Connections 38 5 3 3 Verify Output 38 5 4 Project LowPowerDemo 38 5 4 1 Project Description 38 5 4 2 Hardware Connections 38 5 4 3 Verify Output 39 5 5 Project CapSense 39 5 5 1 Project Description 39 5 5 2 Hardware Connections 40 5 5 3 Verify Output 40 5 6 Project ADC_DAC 41 5 6 1 Project Description 41 5 6 2 Hardware Conn...

Page 5: ...t guide USB A to mini B cable 3 3 V LCD module Inspect the contents of the kit if you find any part missing contact your nearest Cypress sales office for help 1 2 PSoC Creator Cypress s PSoC Creator software is a state of the art easy to use integrated development environment IDE that introduces a hardware and software design environment based on classic schematic entry and revolutionary embedded ...

Page 6: ... to Enable CAN Bus Communication AN54439 PSoC 3 and PSoC 5 External Crystal Oscillators AN52927 PSoC 3 Segment LCD Direct Drive Cypress continually strives to provide the best support Click here to view a growing list of application notes for PSoC 3 and PSoC 5LP 1 3 3 Learn from Peers Cypress Developer Community Forums 1 3 4 More Code Examples PSoC Creator provides a host of example projects that ...

Page 7: ...C Creator provides several Starter Designs These designs highlight features that are unique to PSoC devices They allow you to create a design with various components and code is also pro vided instead of creating a new empty design To use a starter design for your project navigate to File New Project and select the design required Downloaded from Elcodis com electronic components distributor ...

Page 8: ...t Kit or CY8CKIT 050 PSoC 5 Development Kit by following the procedure in the knowledge base article Migrating project from CY8CKIT 001 to CY8CKIT 030 or CY8CKIT 050 Apart from the example projects and starter designs that are available within PSoC Creator Cypress continuously strives to provide the best support Click here to view a growing list of application notes for PSoC 3 and PSoC 5 Downloade...

Page 9: ...Installation on page 11 E 11 08 2012 SASH Updated images 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 Designer User Guide Bracketed Bold Displays keyboard commands in procedures Enter or Ctrl C File Open ...

Page 10: ...10 CY8CKIT 050 PSoC 5LP Development Kit Guide Doc 001 65816 Rev E Introduction Downloaded from Elcodis com electronic components distributor ...

Page 11: ...ructions for PSoC Creator Chapter 4 details the hardware operation Chapter 5 provides instructions to create a simple code example The Appendix section provides the schematics and bill of materials associated with the PSoC 5LP Development Kit 2 2 CD Installation Follow these steps to install the PSoC 5LP Development Kit software 1 Insert the kit CD into the CD drive of your PC The CD is designed t...

Page 12: ...l on the Installation Type page Code examples provided in the Firmware folder 2 5 Uninstall Software The software can be uninstalled using one of the following methods Go to Start Control Panel Add or Remove Programs select the Remove button Go to Start All Programs Cypress Cypress Update Manager Cypress Update Man ager select the Uninstall button Insert the installation CD and click Install PSoC ...

Page 13: ...ing figure Figure 3 1 Connect USB Cable to J1 When plugged in the board enumerates as DVKProg5 After enumeration initiate build and then program using PSoC Creator When using on board programming it is not necessary to power the board from the 12 V or 9 V DC supply or a battery The USB power to the programming section can be used If the board is already powered from another source plugging in the ...

Page 14: ...eration Figure 3 2 Connect MiniProg With the MiniProg3 programming is similar to the on board programmer however the setup enumerates as a MiniProg3 Note Sometimes pop up window will come as shown in figure below Downloaded from Elcodis com electronic components distributor ...

Page 15: ... Development Kit Guide Doc 001 65816 Rev E 15 Kit Operation Then click on Port acquire you will get following window Then click on connect to start programming Downloaded from Elcodis com electronic components distributor ...

Page 16: ...16 CY8CKIT 050 PSoC 5LP Development Kit Guide Doc 001 65816 Rev E Kit Operation Downloaded from Elcodis com electronic components distributor ...

Page 17: ...ircuitry 32 kHz crystal 24 MHz crystal Port E analog performance port and port D CapSense or generic port RS 232 communications interface Prototyping area Character LCD interface CapSense buttons and sliders Note P0 2 is connected to SAR bypass capacitor C40 that can be selected by shorting jumper J43 and P0 4 is connected to SAR bypass capacitor C55 that can be selected by shorting jumper J44 Dow...

Page 18: ...er from the on board programming section using connector J1 Power from JTAG SWD programming interface using connector J3 Power through boost convertor that uses the input test points VBAT and GND Power Adapter 9 V Battery Boost Converter Input Communication USB 10 Pin JTAG SWD SWO Debug and Prog Header On board Programming USB 10 Pin MiniTrace Connector Port D CapSense Miscellaneous Port 32 kHz Cr...

Page 19: ...s the on board programming section Vddd rail This rail provides power to the digital supply for the PSoC device It can be derived from either the 5 V or 3 3 V rail The selection is made using J10 3 pin jumper Vdda rail This rail provides power to the analog supply of the PSoC device It is the output of a low noise regulator U1 The regulator is a variable output voltage and can be either 3 3 V or 5...

Page 20: ... expansion connector This connector brings out ports 0 3 and 4 which are the best performing analog ports on PSoC 3 and PSoC 5 devices The expansion connector port E has two types of grounds One is the analog ground GND_A in silk screen Vssa in the schematic which connects directly to the analog ground on the board The other ground known as GND is used for the digital and high current circuitry on...

Page 21: ...tentiometer by disconnecting J30 Ground the boost pins if boost operation is not used by populating R1 R28 and R29 Also make sure R25 and R31 are not populated 4 2 1 4 AC DC Adaptor Specifications Use adaptors with the following specifications Input voltage 100 to 240 VAC 50 Hz to 60 Hz 1A Output voltage 12 VDC 1A Power output 12 W Polarization Positive center Certification CE certified Some recom...

Page 22: ...hrough the on board programmer A zero ohm resistor R9 is provided on the board to disconnect power to the on board programmer 4 2 2 2 JTAG SWD Programming Apart from the on board programming interface the board also provides the option of using the MiniProg3 This interface is much faster than the on board program interface The JTAG SWD programming is done through the 10 pin connector J3 Figure 4 5...

Page 23: ...ply on page 18 Figure 4 6 USB Interface 4 2 4 Boost Convertor The PSoC 5LP device has the unique capability of working from a voltage supply as low as 0 5 V This is possible using the boost convertor The boost convertor uses an external inductor and a diode These components are prepopulated on the board Figure 4 7 shows the boost convertor To enable the boost convertor functionality make the follo...

Page 24: ...ory In these applications the board has a 24 MHz crystal to provide an accurate main oscillator 4 2 6 Protection Circuit A reverse voltage and over voltage protection circuit is added at the expansion port on 5 V and 3 3 V lines The protection circuit consists of two P channel MOSFET on the power line allowing the power cur rent to flow from input to output depending on the voltages applied at the...

Page 25: ...oC and other on board components The current consumption of these protection cir cuits is less than 6 mA When voltage from the external connector is between 1 8 V and 3 3 V the p MOS Q4 conducts Because the voltage across R16 is less than the threshold voltage Vth of p MOS Q6 it will turn off and the p MOS Q5 conducts allowing voltage supply to the DVK When the external power supply exceeds 3 3 V ...

Page 26: ...eir own unique features 4 2 7 1 Port D This is the miscellaneous port designed to handle CapSense based application boards and digital application boards The signal routing to this port adheres to the stringent requirements needed to provide good performance CapSense This port can also be used for other functions and expansion board kits EBKs This port is not designed for precision analog performa...

Page 27: ...CY8CKIT 050 PSoC 5LP Development Kit Guide Doc 001 65816 Rev E 27 Hardware Figure 4 10 Port D Downloaded from Elcodis com electronic components distributor ...

Page 28: ...unctionally compatible to port A of the PSoC Development Kit and it is easy to port an application developed on port A This port has two types of grounds CGND1 and CGND2 The two grounds are connected to the GND on the board but are provided for expansion boards designed for analog performance The expansion boards have an analog and digital ground The two grounds on this port help to keep it distin...

Page 29: ...g out the four dedicated opamp pins on the device Therefore these ports can be used with the prototyping area to create simple yet elegant analog designs It also brings SIOs such as port 12 4 port 12 5 port 12 6 and port 12 7 and GPIOs such as port P6 0 and port P6 6 Power and ground connections are close to the prototyping space for convenience The area also has four LEDs and two switches for app...

Page 30: ...R on header P6 in the prototyping area 4 2 10 Character LCD The kit has a character LCD module which goes into the character LCD header P8 The LCD runs on a 3 3 V supply and can function regardless of the voltage on which PSoC is powered A zero ohm resistor setting is available on the LCD section R71 72 making it possible to convert it to a 3 3 V LCD CAUTION When the resistor is shifted to support...

Page 31: ...special requirements for CapSense It has two CapSense buttons and a 5 element CapSense slider The CapSense buttons are connected to pins P5 6 and P5 5 The slider elements are connected to pins P5 0 4 The Cmod modulation capacitor is connected to pin P6 4 and an optional Rb bleeder resistor is available on P15 4 Downloaded from Elcodis com electronic components distributor ...

Page 32: ...32 CY8CKIT 050 PSoC 5LP Development Kit Guide Doc 001 65816 Rev E Hardware Figure 4 16 CapSense Sensors Downloaded from Elcodis com electronic components distributor ...

Page 33: ... click OK 3 The project opens in PSoC Creator and is saved to that folder 4 Build the code example to generate the hex file 5 To program connect the board to a computer using the USB cable connected to port J1 as described in On board Programming Interface on page 21 The board is detected as DVKProg5 6 Click Debug Program 7 The programming window opens up If the silicon is not yet acquired select ...

Page 34: ...dware Connections The example requires the character LCD on P8 Because it uses the potentiometer the jumper POT_PWR should be in place This connects the potentiometer to the Vdda 5 1 3 SAR ADC Configuration To view or configure the SAR ADC component double click the component in the TopDesign cysch file Figure 5 2 SAR ADC Configuration The SAR ADC is configured as follows Free running mode of oper...

Page 35: ...meter Figure 5 3 demonstrates the functionality When you turn the potentiometer the voltage value changes You can also verify the voltage on the potentiom eter using a precision multimeter Note The potentiometer connects to a differential ADC which works in single ended mode This means the ADC input is measured against internal Vssa Any offset in the measurement can be pos itive or negative This c...

Page 36: ... Configuration To configure the Del Sig ADC Select the continuous mode of operation because the ADC scans only one channel Set the conversion rate to 187 samples sec which is the maximum sample rate possible at 20 bit resolution Set the range from Vssa to Vdda in single ended mode because the potentiometer output is a single ended signal that can go from 0 to Vdda Therefore at 20 bit resolution th...

Page 37: ...es the functionality When you turn the potentiometer the voltage value changes You can also verify the voltage on the potentiometer using a precision multimeter Note The potentiometer connects to a differential ADC which works in single ended mode This means the ADC input is measured against internal Vssa Any offset in the measurement can be positive or negative This can result in a small offset v...

Page 38: ...cycling the board The project output is LED3 glowing with a brightness control that changes with time see Figure 5 6 Figure 5 6 Verify Output Code Example 5 4 Project LowPowerDemo 5 4 1 Project Description This example project demonstrates the low power functionality of PSoC 5 The project implements an RTC based code which goes to sleep and wakes up on the basis of switch inputs The RTC uses an ac...

Page 39: ... of less than 2 µA is displayed The device wakes up when SW2 is pressed again and displays the time on the LCD The following figures show the output display Figure 5 7 PSoC 5 in Active Mode Figure 5 8 PSoC 5 in Sleep Mode 5 5 Project CapSense 5 5 1 Project Description This code example provides a platform to build CapSense based projects using PSoC 5LP The example uses two CapSense buttons and one...

Page 40: ...the board 5 5 3 Verify Output Build and program the code example and reset the device The LCD displays the status of the two buttons as On Off The LCD also shows the slider touch position as a percentage When you touch a button the LCD displays ON when you remove the finger from the button the LCD displays OFF When the slider is touched the corresponding finger position is displayed as a percentag...

Page 41: ...ng DMA at a frequency proportional to the ADC count 5 6 2 Hardware Connections For this example the character LCD must be installed on P8 The example uses the potentiometer therefore the jumper POT_PWR should also be in place This jumper connects the potentiometer to the Vdda 5 6 3 Verify Output Build and program the code example and reset the device to view the ADC output displayed on the LCD LED...

Page 42: ...42 CY8CKIT 050 PSoC 5LP Development Kit Guide Doc 001 65816 Rev E Code Examples Figure 5 11 ADC Output Downloaded from Elcodis com electronic components distributor ...

Page 43: ...C6 22 uFd 10V 0805 R23 ZERO 0805 R23 ZERO 1 2 TP1 BLACK TP1 BLACK 1210 C22 22 uFd 10V 1210 C22 22 uFd 10V 0805 R11 1K 0805 R11 1K 1 2 0805 R57 ZERO 0805 R57 ZERO 1 2 TP2 RED TP2 RED TP4 RED TP4 RED TO 252 U2 AP1117D50G TO 252 U2 AP1117D50G GND 1 VOUT 2 VIN 3 J10 J10 1 1 2 2 3 3 0805 R27 ZERO 0805 R27 ZERO 1 2 0603 R13 3 74K 0603 R13 3 74K 1 2 0402 C17 0 1 uFd 0402 C17 0 1 uFd 3216 C5 10 uFd 16v 32...

Page 44: ...44 CY8CKIT 050 PSoC 5LP Development Kit Guide Doc 001 65816 Rev E Downloaded from Elcodis com electronic components distributor ...

Page 45: ...U5 CY7C68013A 56LTXC U5 CY7C68013A 56LTXC RESERVED 14 WAKEUP 44 PA1 nINT1 34 SCL 15 VCC5 43 SDA 16 PA2 SLOE 35 VCC3 17 PA3 WU2 36 VCC4 27 PA4 FIFOADR0 37 PA5 FIFOADR1 38 AVCC1 3 PA6 PKTEND 39 GND3 26 PA7 FLAGD 40 GND4 28 PB0 FD0 18 GND6 56 AGND1 6 XTALIN 5 XTALOUT 4 PA0 nINT0 33 PB1 FD1 19 PB2 FD2 20 PB3 FD3 21 PB4 FD4 22 PB5 FD5 23 PB6 FD6 24 PB7 FD7 25 DPLUS 8 DMINUS 9 CLKOUT 54 RESET 42 VCC6 55...

Page 46: ... 0 uFd 3216 C28 10 uFd 16v 3216 C28 10 uFd 16v J21 J21 1 1 P2 20x2 RECP RA P2 20x2 RECP RA 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 23 23 25 25 27 27 29 29 31 31 33 33 35 35 37 37 39 39 22 22 24 24 26 26 28 28 30 30 32 32 34 34 36 36 38 38 40 40 J24 J24 1 1 J20 J20 1 1 J19 J19 1 1 J23 J23 1 1 P1 20x2 RECP RA P1 20x2 RECP RA 1 1 2 2...

Page 47: ...CY8CKIT 050 PSoC 5LP Development Kit Guide Doc 001 65816 Rev E 47 Downloaded from Elcodis com electronic components distributor ...

Page 48: ...48 CY8CKIT 050 PSoC 5LP Development Kit Guide Doc 001 65816 Rev E Downloaded from Elcodis com electronic components distributor ...

Page 49: ...CY8CKIT 050 PSoC 5LP Development Kit Guide Doc 001 65816 Rev E 49 A 2 Board Layout A 2 1 PDC 09356 Top Downloaded from Elcodis com electronic components distributor ...

Page 50: ...50 CY8CKIT 050 PSoC 5LP Development Kit Guide Doc 001 65816 Rev E A 2 2 PDC 09356 Power Downloaded from Elcodis com electronic components distributor ...

Page 51: ...CY8CKIT 050 PSoC 5LP Development Kit Guide Doc 001 65816 Rev E 51 A 2 3 PDC 09356 Ground Downloaded from Elcodis com electronic components distributor ...

Page 52: ...52 CY8CKIT 050 PSoC 5LP Development Kit Guide Doc 001 65816 Rev E A 2 4 PDC 09356 Bottom Downloaded from Elcodis com electronic components distributor ...

Page 53: ...3 10 Taiyo Yuden TMK107BJ105KA T 9 2 C25 C27 22pF CAP CER 22 pF 50V 5 COG 0603 SMD Panasonic ECG ECJ 0EC1H220J 10 1 C39 2200 pFd SMD SMT 0805 2200pF 50volts C0G 5 Murata GRM2165C1H222JA0 1D 11 2 C54 C55 1 0 uFd CAP CERAMIC 1 0UF 25V X5R 0603 10 Taiyo Yuden TMK107BJ105KA T 12 6 D1 D2 D3 D4 D7 D8 SS12 E3 61T DIODE SCHOTTKY 20V 1A SMA Vishay General Semiconductor SS12 E3 61T 13 1 D5 LED Green LED GRE...

Page 54: ...ES 32 2 R3 R4 100K RES 100K OHM 1 16W 5 0402 SMD Panasonic ECG ERJ 2GEJ104X 33 6 R9 R23 R24 R26 R27 R71 ZERO RES 0 0 OHM 1 10W 5 0805 SMD Panasonic ECG ERJ 6GEY0R00V 34 2 R5 R6 2 2K RES 2 2K OHM 1 16W 5 0402 SMD Panasonic ECG ERJ 2GEJ222X 35 3 R11 R10 R18 1K RES 1 0K OHM 1 8W 5 0805 SMD Panasonic ECG ERJ 6GEYJ102V 36 1 R12 3 16K RES 3 16K OHM 1 10W 5 0603 SMD Yageo RT0603DRD073K16L 37 1 R13 3 74K ...

Page 55: ...35 55 1 U8 MAX3232CDR IC 3 5 5V LINE DRVR RCVR 16 SOIC Texas Instur ments MAX3232IDR 56 1 Y1 24 MHz CER RESONATOR 24 0 MHz SMD Murata CSTCW24M0X53 R0 57 1 Y2 32 768KHz XTAL CRYSTAL 32 768 KHZ CYL 12 5PF CFS308 Citizen America Corporation CFS308 32 768KDZF UB 58 1 Y3 24 MHz Crystal CRYSTAL 24 000MHZ 20PF SMD ECS Inc ECS 240 20 5PX TR 59 3 J8 J33 TP2 RED TEST POINT TEST POINT PC MINI 040 D RED Keyst...

Page 56: ...M 4MM TOP ADJ SMD Bourns Inc 3214W 1 103E 77 2 R1 R28 ZERO RES ZERO OHM 1 10W 5 0603 SMD Panasonic ECG ERJ 3GEY0R00V 78 1 U6 LM4140 IC REF PREC VOLT MICROPWR 8 SOIC National Semi conductor LM4140ACM 1 0 NOPB 79 1 R8 1 5K RES 1 5KOHM 1 10W 1500PPM 5 0805 Panasonic ECG ERA S15J152V 80 1 R2 3K RES 1 10W 3K OHM 0 1 0805 Stackpole Elec tronics Inc RNC 20 T9 3K 0 1 R 81 1 J38 3p_jumper CONN HEADER VERT ...

Page 57: ...JUMPER GF 13 5 CLOSE TYPE BLACK Kobiconn 151 8030 E 90 2 J43 J44 Install jumper across pins 1 and 2 Rectangular Connectors MINI JUMPER GF 13 5 CLOSE TYPE BLACK Kobiconn 151 8030 E External Assembly 91 2 Install 3 3V label as per assembly spec 3 3V label 92 2 4 40 X 5 13 Brass Spacer Stud with Nut Spacer and nut for RS232 Connector P7 Item Qty Reference Value Description Manufacturer Manufacturer P...

Page 58: ...to Pin 12 on Port E 79 P0 7 Connected to Pin 11 on Port E Port 1 20 P1 0 Connected to 3 points 1 Connected to Pin 2 on programming header J3 2 Connected to Pin 45 on U5 3 Connected to Pin 8 SWDIO on Port D 21 P1 1 Connected to 3 points 1 Connected to Pin 4 on programming header 2 Connected to Pin 56 on U5 3 Connected to Pin 7 SWDCK on Port D 22 P1 2 Connected to Pin 6 on Port D 23 P1 3 Connected t...

Page 59: ... Pin 8 on trace header J40 2 Connected to LCD module 3 Connected to Pin 12 on Port D 3 P2 7 Connected to 3 points 1 Connected to Pin 10 on trace header J40 2 Connected to LCD module 3 Connected to Pin 11 on Port D Port 3 44 P3 0 Connected to Pin 8 on Port E 45 P3 1 Connected to Pin 7 on Port E 46 P3 2 Connected to 2 points 1 Voltage reference Chip 2 Connected to Pin 6 on Port E 47 P3 3 Connected t...

Page 60: ...onnected to 2 points 1 Connected to CapSense button CSB2 2 Connected to Pin 22 on Port D 34 P5 7 Connected to Pin 21 on Port D Port 6 89 P6 0 Connected to Pin 5 on P9 90 P6 1 Connected to SW2 push button 91 P6 2 Connected to LED3 92 P6 3 Connected to LED4 6 P6 4 Connected to CapSense Modulation Capacitor CMOD 7 P6 5 Connected to 2 points 1 Connected to VR POT 2 Connected to Pin 5 on P6 8 P6 6 Conn...

Page 61: ...CCd Connected to VCCd 86 VCCd Connected to VCCd 65 VDDa Connected to VDDa 37 VDDd Connected to VDDd 88 VDDd Connected to VDDd 75 VDDio0 Connected to VDDio0 26 VDDio1 Connected to VDDio1 100 VDDio2 Connected to VDDio2 50 VDDio3 Connected to VDDio3 64 VSSa Connected to GND 10 VSSb Connected to GND 14 VSSd Connected to GND 38 VSSd Connected to GND 66 VSSd Connected to GND 87 VSSd Connected to GND 15 ...

Page 62: ...62 CY8CKIT 050 PSoC 5LP Development Kit Guide Doc 001 65816 Rev E Downloaded from Elcodis com electronic components distributor ...

Reviews: