background image

CY3270

PSoC

® 

1 FirstTouch™ Kit Guide

Document No. 001-15945 Rev. *D

Cypress Semiconductor

198 Champion Court

San Jose, CA 95134-1709

Phone (USA): 800.858.1810

Phone (Intnl): 408.943.2600

http://www.cypress.com

Содержание PSoC 1 FirstTouch CY3270

Страница 1: ...CY3270 PSoC 1 FirstTouch Kit Guide Document No 001 15945 Rev D Cypress Semiconductor 198 Champion Court San Jose CA 95134 1709 Phone USA 800 858 1810 Phone Intnl 408 943 2600 http www cypress com ...

Страница 2: ...and subject to worldwide patent protection United States and foreign United States copyright laws and international treaty provisions Cypress hereby grants to licensee a personal non exclusive non transferable license to copy use modify create derivative works of and compile the Cypress Source Code and derivative works for the sole purpose of creating custom soft ware and or firmware in support of...

Страница 3: ...CapSense Touch Sensing Demonstration Default 18 3 2 2 Temperature Sensing Demonstration 18 3 2 3 Light Sensing Demonstration 18 3 2 4 CapSense Proximity Sensing Demonstration 18 4 Hardware 19 4 1 System Block Diagram 19 4 2 FTPC Bridge First Touch PC Bridge 20 4 2 1 LED Usage 21 4 3 Expansion Card Overview 23 4 4 Expansion Card Details 23 4 4 1 FirstTouch MultiFunction Expansion FTMF Card 23 5 Cod...

Страница 4: ...ic 61 A 1 2 First Touch Multifunction Card Schematic 62 A 2 Board Layout 63 A 2 1 PDCR 9402 Primary side 63 A 2 2 PDCR 9402 Secondary Side 63 A 2 3 Assembly Drawing of First touch Multifunction Card Primary side 63 A 2 4 Assembly Drawing of First touch Multifunction Card Secondary Side 64 A 2 5 PDCR 9403 Primary Side 64 A 2 6 PDCR 9403 Secondary Side 64 A 2 7 Assembly Drawing for FirstTouch PC Bri...

Страница 5: ...terface Provides PSoC MiniProg emulation for in system serial programming ISSP of the expansion cards Provides communications with the PSoC programming utility Performs HID data channel communications Performs expansion card I2C communications Performs expansion card SPI communications There are no other active components inside of the FTPC bridge All of these interfaces run on a sin gle PSoC devi...

Страница 6: ... Bridge control panel installation file packaged along with PSoC Programmer Code examples Hardware files Kit guide Quick start guide Release notes Inspect the contents of the kit If any parts are missing contact your nearest Cypress sales office for further assistance 1 2 Additional Learning Resources Visit www cypress com for additional learning resources in the form of data sheets technical refe...

Страница 7: ...270 PSoC 1 FirstTouch Kit Guide Code Examples chapter Added My First Code Example section updated all flowcharts 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 ke...

Страница 8: ...8 CY3270 PSoC FirstTouch Kit Guide Document No 001 15945 Rev D Introduction ...

Страница 9: ... This file ISO image is an archive file of the optical disc provided with the kit You can use this to create an installer CD or extract information using WinRar or similar tools CY3270 FTK_ Single Package This executable file installs the contents of the kit CD which includes PSoC Programmer PSoC Designer kit code examples kit hardware files and user doc uments CY3270 FTK_Single Package without pr...

Страница 10: ...cyautorun exe file on the root directory of the CD as shown in Figure 2 2 Figure 2 2 Root Directory of the CD 3 The InstallShield Wizard screen appears On this screen choose the folder location to install the setup files You can change the location of the folder for the setup files using Change as shown in Figure 2 3 4 Click Next to launch the kit installer ...

Страница 11: ...lation Overview screen select the installation type that best suits your requirement The drop down menu has three options Typical Complete and Custom as shown in Figure 2 4 6 Click Next to start the installation Figure 2 4 Installation Type Options 7 After the installation begins a list of all packages appears on the Installation Page ...

Страница 12: ...ument No 001 15945 Rev D Getting Started 8 A green check mark appears next to each package as it is downloaded and installed see Figure 2 5 9 Wait until all the packages are downloaded and installed successfully Figure 2 5 Installation Page ...

Страница 13: ...at you have all hardware and drivers setup for the CY3270 PSoC 1 FTK by connecting the kit to your PC through its USB interface As this is the first time you connect the board to this PC initial drivers get installed Follow the on screen dialogs for USB detec tion to complete the installation process Verify your installation and setup by opening PSoC Pro grammer with the kit board attached Note Ad...

Страница 14: ...k with an existing project on the PSoC Designer version menu Figure 2 7 PSoC Designer Interconnect View 3 To experiment with the example projects go to Chapter 5 Note For more details on PSoC Designer go to the PSoC Designer IDE Guide at the following loca tion InstallDirectory Program Files Cypress PSoC Designer version Documentation See Additional Learning Resources on page 6 for links to PSoC D...

Страница 15: ...ears in the Action Pane 6 Close PSoC Programmer Note For more details on PSoC Programmer go to the Programmer user guide at InstallDirectory Program Files Cypress Programmer version Documents 2 5 Install Hardware Insert the PSoC FirstTouch Starter Kit FTPC Bridge and FTMF Expansion Card connected into your computer s USB port In the Found New Hardware Wizard window select No not this time In the s...

Страница 16: ...Expansion Card into the header of the FTPC Bridge such that Cypress Perform is visible on both boards Insert the assembled kit in your computer s USB port Select Cancel in the Found New Hardware Wizard window that appears 2 Slide your finger along the CapSense touch sensing slider found on the furthest point away from your computer Notice the LED variation based on the position of your finger on t...

Страница 17: ...supplied through USB to the card PSoC Programmer is used to program the hex file on to the FTMF card 3 2 FTMF Expansion Card Demonstrations The FTMF expansion card provided in your kit is capable of supporting a variety of demonstrations Each demonstration has an associated PSoC Designer project and a datasheet that describes the operation and usage of each of the demonstrations in detail Since th...

Страница 18: ...shows how to use an ambient light sensor to control LED intensity Cover the light sensor with the palm of your hand and notice how the intensity of the LED changes Removing your palm leads to the LED intensity reverting back to its initial state PSoC detects the ambient light and controls the LED s output 3 2 4 CapSense Proximity Sensing Demonstration The CapSense proximity sensing demonstration s...

Страница 19: ... 4 Hardware 4 1 System Block Diagram The CY3270 PSoC 1 FTK has the following sections PC bridge FTPC bridge Multifunction card Figure 4 1 System Block Diagram for FirstTouch PC Bridge FTPC Bridge USB Port Blue LED PSoC CY8C24894 Programming and Interface Connector ...

Страница 20: ... a host controller usually personal computers The FTPC Bridge acts as the interface bridge between the expansion cards your PC and various applications such as PSoC Designer and the PSoC Programmer utility The master CY8C24894 also acts as a PSoC programmer and downloads the firmware hex file on to the application The ISSP programmer programs PSoC ICs with hex files created with the Cypress PSoC D...

Страница 21: ...K DETECT TYPE LED_ALIVE LED_ALIVE V50 V50 V50 V50 V50 0805 R4 27 0805 R1 Zero 0805 R8 100 0805 R13 1K 0805 C2 0 1 uFd J1 ISSP894 1 2 3 4 5 TP4 0805 R5 27 1206L F1 350mA 0805 C6 0 01 uFd 0805 R14 Zero TP0 RADIAL D1 LED Blue 1 2 0805 C4 0 1 uFd 0805 R15 Zero TP6 U1 CY8C24894 QFN56 18 17 16 15 41 2 42 1 43 56 44 55 36 45 54 46 53 47 50 19 33 10 34 9 35 8 7 37 6 38 5 39 4 40 3 29 14 30 13 52 48 51 20 ...

Страница 22: ...aching an expansion card all of the necessary connections are made Figure 4 4 is the pinout diagram for the FTPC expansion port Refer to this figure as you create proj ects As you get more accustomed to the FirstTouch Kit and design flow you may want to make your own expansion cards and at that time want to review the interface signals Figure 4 4 FTPC Expansion Port Pinout Diagram 8x2 0 100 FEMALE...

Страница 23: ...ferent sensors and signal types Each of the sensors use dedicated host PSoC I O pins Therefore it is important to note which pins connect the various sensors to the host PSoC These details are provided in the expansion card specific portion of this guide 4 4 Expansion Card Details This section provides details for the expansion cards included with the CY3270 PSoC 1 FTK Future expansion cards will ...

Страница 24: ...chosen because they can operate as analog outputs analog inputs digital inputs digital outputs or any combination of the four types this pin selection makes them true analog or digital GPIO PSoC Designer project designates the specific function for these A D GPIO pins You can use the sensors and output devices in any way you want within your project but make certain you always assign the correct p...

Страница 25: ...ications such as portable media players and mobile handsets has created demand for the same technology in more conventional consumer elec tronics Its hardware details are shown in the Figure 4 7 CSENSE7 CSENSE6 CSENSE5 CSENSE4 CSENSE3 CSENSE2 CSENSE1 CSB3 Cap Sense FTMF 1 2 CS GND 0603 R14 560 0603 R17 560 CSB5 Cap Sense FTMF 1 2 CS GND CSB2 Cap Sense FTMF 1 2 CS GND 0603 R15 560 0603 R18 560 CSB7...

Страница 26: ...nnect the proximity antenna prior to plugging in the FirstTouch kit The project is set up to recalculate this baseline approximately every 30 seconds Note how the shape and position of the wire affects the demonstration operation and the proximity sensing distance 4 4 1 1 CY8C21434 Chip The FTMF expansion card connects the various sensors and output devices to a predefined I O of the host CY8C2143...

Страница 27: ...stem programming data ISSP_DAT 14 P1 2 Blue LED drive 15 P1 4 Green LED drive 16 P1 6 Alarm buzzer FET drive 17 XRES In system programming reset pin ISSP_XRES 18 P3 0 Unused no connect y CSENSE5 CSENSE2 CSENSE7 CSENSE3 CSENSE4 CSENSE6 CSENSE1 ISSP_CLK ISSP_XRES ISSP_DAT LED_BLUE LED_GRN I2C_SDA I2C_SCL TSENSE PO2 PO4 PO5 LSENSE ZVREF PO3 ALARM LED_RED VEXP VEXP VEXP 0603 R10 2 2K TV2 PRX1 RECEPTAC...

Страница 28: ...CapSense slider element 4 23 P2 6 CapSense slider element 6 24 P0 0 Thermistor temperature sensor analog input 25 P0 2 User A D GPIO 26 P0 4 User A D GPIO 27 P0 6 Ambient light detector analog input 28 Vdd 29 P0 7 Thermistor drive voltage reference analog input 30 P0 5 User A D GPIO 31 P0 3 User A D GPIO 32 GND Table 4 1 FTMF PSoC Pin Assignments Pin Number Port Number Design Function ...

Страница 29: ...tion of finger on the board The code example contains the following User Modules CSD The CSD module is used to scan the CapSense sensors and determine the finger position on the slider when touched LED LED is used to display the output based on the data from CapSense EzI2Cs The EzI2Cs module configures the PSoC on the multifunction board as an I2C slave The slave data is available for acquisition ...

Страница 30: ...mple_My_First_PSoC_Project see Figure 5 1 4 Click Browse and navigate to the directory in which the project is being created Start If finger position is on slider positions CSB1 CSB3 Enable Global Interrupts Turn ON Blue LED Turn ON Red LED Turn ON Green LED Initialize CSD LED EzI2Cs Module If finger position is on slider positions CSB4 CSB5 If finger position is on slider positions CSB6 CSB7 Upda...

Страница 31: ...New Project Window 5 Click OK The Select Project Type window opens 6 In this window under Select Target Device click View Catalog Figure 5 2 Select Project Type Window 7 The Device Catalog window opens Click the All Devices tab 8 For this project click CY8C21434 24LFXI and then click Select ...

Страница 32: ...32 CY3270 PSoC FirstTouch Kit Guide Document No 001 15945 Rev D Code Examples Figure 5 3 Device Catalog Window ...

Страница 33: ... Using select C and click OK 10 By default the project opens in chip view Figure 5 4 Default View 11 Now place and configure the modules required for this design Connect the modules together and to the pins of the PSoC In the User Modules window select the Cap Sensors folder Figure 5 5 User Modules Window ...

Страница 34: ...e Cap Sensors folder right click on CSD and select Place Figure 5 6 User Modules Window CSD Select 13 A pop up window opens with the configuration of the CSD module to be selected Select CSD without clock prescaler as the default module Click OK Figure 5 7 CSD Configuration Window Select ...

Страница 35: ...1 15945 Rev D 35 Code Examples 14 The User Module UM CSD is placed in the analog and digital blocks respectively Figure 5 8 CSD User Module Placement 15 Rename CSD_1 as CSD and configure the CSD properties Figure 5 9 Configure CSD Parameters Window ...

Страница 36: ... FirstTouch Kit Guide Document No 001 15945 Rev D Code Examples 16 Right click on the CSD user module icon and select the CSD Wizard option to assign pins to the sensors properly Figure 5 10 Select CSD Wizard Window ...

Страница 37: ...ument No 001 15945 Rev D 37 Code Examples 17 Open the CSD Wizard window Figure 5 11 Default CSD Wizard Window 18 The following screenshot shows the default settings in the Global Settings window Figure 5 12 Default Global Settings Window ...

Страница 38: ... in the window Figure 5 13 Configured Global Settings Window 20 Click on Slider in the CSD wizard window Following are the default settings in the Sensors Set tings window Figure 5 14 Default Sensors Settings 21 Configure the parameters in the Sensors Settings window Figure 5 15 Configured Sensor Settings ...

Страница 39: ... drag from the sensor block to the required pin in the Pin Assignment window Drag and drop S1 0 of the slider to pin P2 0 The assignment of the sensor pins can be done in either Table Pin Assignment View Figure 5 16 or Chip Pin Assignment View Figure 5 17 Figure 5 16 S1 0 Placed on P2 0 Pin Block Figure 5 17 S1 0 Assigned to Pin P2 0 ...

Страница 40: ... FirstTouch Kit Guide Document No 001 15945 Rev D Code Examples 23 Similarly assign all the sensors from S1 1 through S1 7 to pins P2 1 through P2 7 and click OK Figure 5 18 Sensors Assigned Table Pin Assignment View ...

Страница 41: ...CY3270 PSoC FirstTouch Kit Guide Document No 001 15945 Rev D 41 Code Examples 24 All the assigned sensors can be seen in Chip Pin Assignment View Figure 5 19 Sensors Assigned Chip Pin Assignment View ...

Страница 42: ... in the CSD Wizard window the pins to which sensors are assigned can be seen in the Chip Level diagram Figure 5 20 CSD Component 26 In the User Modules window expand the Digital Comm folder right click on EzI2Cs and select Place to place an EzI2Cs in the design Figure 5 21 EzI2Cs User Module selection ...

Страница 43: ... 43 Code Examples 27 The EzI2Cs module does not require any digital or analog blocks for placement It requires either configurable P1 0 and P1 1 or P1 5 and P1 7 port pins to operate as SCL and SDA 28 Configure the EzI2Cs properties Figure 5 22 EzI2Cs Properties ...

Страница 44: ...44 CY3270 PSoC FirstTouch Kit Guide Document No 001 15945 Rev D Code Examples 29 The EzI2Cs module can be seen in the Chip window Figure 5 23 EzI2Cs Component ...

Страница 45: ...Rev D 45 Code Examples 30 In the User Modules window expand the Misc Digital folder right click on LED and select Place to place the LED Figure 5 24 User Modules Window LED Select 31 Configure LED properties and rename as LED_BLUE Figure 5 25 LED Properties ...

Страница 46: ...6 CY3270 PSoC FirstTouch Kit Guide Document No 001 15945 Rev D Code Examples 32 After the configuration LED_BLUE is assigned and is visible in the Chip Level diagram Figure 5 26 LED User Module Placement ...

Страница 47: ... FirstTouch Kit Guide Document No 001 15945 Rev D 47 Code Examples 33 Place two more LED modules and configure as shown in the following screenshots Figure 5 27 LED Red Properties Figure 5 28 LED Green Properties ...

Страница 48: ...ide Document No 001 15945 Rev D Code Examples 34 Place LED_GREEN LED_RED and LED_BLUE in their respective ports Figure 5 29 All LEDs Placed 35 Keep the default values for the Global Resources window Figure 5 30 Global Resources Window ...

Страница 49: ...ect Project 39 Connect the FirstTouch Multifunction Expansion FTMF card to the PC Bridge Figure 5 32 FTMF Card Connection with PC Bridge 40 FTMF is programmed using PC Bridge 41 The blue LED blinks fast when the bridge is first connected to the USB port of a PC After hot plug and play is established it blinks at a periodic interval to indicate that the bridge is enumerated and functioning normally...

Страница 50: ...er is selected and it is Connected b Acquire Mode Reset c Verification Off d Power Settings 5 0 V 45 Click on the Program button to start programming the board The programming status can be observed on the progress bar Figure 5 34 Programming Status 46 When programming is successful the Operation Succeeded message is displayed Figure 5 35 Operation Succeeded Message 47 Disconnect the PC Bridge fro...

Страница 51: ...ger on the slider Figure 5 36 shows the change in LED color with respect to position of the finger on the board Figure 5 36 LED Color Variation with Respect to Finger Position 5 2 MultiFunction Expansion Card Light Sensor The purpose of this code example is to demonstrate a light sensor In this code example the light sensor is used to control the brightness of the LED array The code example contai...

Страница 52: ...Guide Document No 001 15945 Rev D Code Examples 5 2 1 Device Configuration The chip level view of the code example after placing all the required user modules is shown in Figure 5 37 Figure 5 37 Device Configuration of Light Sensor ...

Страница 53: ...itecture 5 2 2 1 Flowchart 5 2 2 2 Verify Output 1 When light is present the LED is switched ON 2 When light is not present LED is switched OFF Start If ADC_Data ZERO Enable Global Interrupts Turn ON Blue LED Initialize ADC LED EzI2Cs Modules Yes Get ADC Data from Light Sensor No Turn OFF Blue LED ...

Страница 54: ...ated in the middle of the board As you move your finger near and far from the proximity detection antenna the red and green LEDs turn on and off At close proximity the green LED turns ON The code example contains the following User Modules CSD The CSD module is used to scan the CapSense based proximity sensor and determine the proximity of a object to the antenna LED LED is used to display the out...

Страница 55: ... Document No 001 15945 Rev D 55 Code Examples 5 3 1 Device Configuration The chip level view of the code example after placing all the required user modules is shown in Figure 5 39 Figure 5 39 Device Configuration of Proximity Sensor ...

Страница 56: ...3 2 2 Verify Output 1 The color changes when the finger is taken near the proximity antenna 2 The color remains red when no data is received from the antenna Start If Sensor_data ZERO Enable Global Interrupts Turn ON Green LED Initialize CSD LED EzI2Cs Modules Yes Get Finger Position around Proximity Sensor No Turn ON Red LED ...

Страница 57: ...eading is recorded different colored LEDs red green and blue are turned ON or OFF The code example contains following User Modules ADC10 These modules convert analog input to digital form The ADC module is used to obtain the digital values for the temperature LED LED is used to display the output based on the data from ADC EzI2Cs The EzI2Cs module configures PSoC on the MultiFunction board as I2C ...

Страница 58: ...de Document No 001 15945 Rev D Code Examples 5 4 1 Device Configuration The chip level view of the code example after placing all the required user modules is shown in Figure 5 41 Figure 5 41 Device Configuration of Temperature Sensor ...

Страница 59: ...f the temperature is between 16 C and 28 C The blue LED is ON only if the temperature is between 16 C and 10 C Start If temperature is between 10 C to 16 C Enable Global Interrupts Turn ON Blue LED Turn ON Red LED Turn ON Green LED Initialize ADC LED EzI2Cs Module If temperature is between 16 C to 28 C If temperature is between 28 C to 55 C Update EzI2Cs Registers Convert ADC Value to Temperature ...

Страница 60: ...60 CY3270 PSoC FirstTouch Kit Guide Document No 001 15945 Rev D Code Examples Figure 5 42 Temperature Reading and Updated LED Status ...

Страница 61: ...E 11 VEXP_OUT 4 MISO 13 SPI_nss 15 SDA MOSI 6 SCL SCLK 8 VLOCAL 2 GPIO2 16 GPIO3 14 GPIO4 12 GPIO5 10 0805 R2 100K 0805 R2 100K TP2 TP2 0805 R3 100K 0805 R3 100K A C1 22 uFd 10v A C1 22 uFd 10v 0805 R4 22 0805 R4 22 0805 R8 100 0805 R8 100 0805 R13 1K 0805 R13 1K 0805 R12 NO LOAD 0805 R12 NO LOAD 0805 C6 0 01 uFd 0805 C6 0 01 uFd 0805 R15 Zero 0805 R15 Zero 0805 R9 NO LOAD 0805 R9 NO LOAD TP4 TP4 ...

Страница 62: ...R14 560 0603 R17 560 0603 R4 1K PRX1 RECEPTACLE 1x1 1 1 0603 R8 100 PR1 LX1972A 1 2 CSB5 Cap Sense FTMF 1 2 CS GND TV1 0603 R2 560 CSB2 Cap Sense FTMF 1 2 CS GND 0603 R11 10K 1 J1 8X2 PIN HDR RA 1 3 5 7 9 11 4 13 15 6 8 2 16 14 12 10 VEXP_IN GND ISSP_XRES ISSP_CLK ISSP_DAT EXP_TYPE VEXP_OUT MISO SPI_nss SDA MOSI SCL SCLK NC GPIO2 GPIO3 GPIO4 GPIO5 0603 R15 560 B G R D1 LED BLUE GREEN RED 1 6 2 3 4...

Страница 63: ...oC FirstTouch Kit Guide Document No 001 15945 Rev D 63 Appendix A 2 Board Layout A 2 1 PDCR 9402 Primary side A 2 2 PDCR 9402 Secondary Side A 2 3 Assembly Drawing of First touch Multifunction Card Primary side ...

Страница 64: ...4 CY3270 PSoC FirstTouch Kit Guide Document No 001 15945 Rev D Appendix A 2 4 Assembly Drawing of First touch Multifunction Card Secondary Side A 2 5 PDCR 9403 Primary Side A 2 6 PDCR 9403 Secondary Side ...

Страница 65: ...CY3270 PSoC FirstTouch Kit Guide Document No 001 15945 Rev D 65 Appendix A 2 7 Assembly Drawing for FirstTouch PC Bridge ...

Страница 66: ... F 11 1 RT1 THERMISTOR NTC 10 KΩ 1 LEADED BC Components 2381 640 55103 12 1 R1 RES CHIP 10 0 KΩ 1 16 W 1 0603 SMD Panasonic ECG ERA 3AEB103V 13 1 R11 RES CHIP 10 0 KΩ 1 16 W 1 0603 SMD Phycomp USA Inc 9C06031A1002FKHFT 14 1 R3 RES 680 Ω 1 10 W 5 0603 SMD Panasonic ECG ERJ 3GEYJ681V 15 2 R4 R6 RES 1 0 KΩ 1 16 W 5 0603 SMD Panasonic ECG ERJ 3GEYJ102V 16 1 R5 RES 2 0 KΩ 1 16W 5 0603 SMD Panasonic ECG...

Страница 67: ... J3 PC Board Connector Dual Row Right Angle 16 Circuits Molex Waldom Electronics Corp 90152 2116 8 4 R1 R14 R15 R16 RES 0 0 Ω 1 8W 5 0805 SMD Rohm MCR10EZHJ000 9 3 R2 R3 R6 RES 100 KΩ 1 8W 5 0805 SMD Rohm MCR10EZHJ104 10 2 R4 R5 RES 22 Ω 1 8W 5 0805 SMD Panasonic ECG ERJ 6GEYJ220V 11 2 R8 R7 RES 100 Ω 1 8W 5 0805 SMD Rohm MCR10EZHJ101 12 1 R13 RES 1 0 KΩ 1 8W 5 0805 SMD Rohm MCR10EZHJ102 13 1 U1 P...

Отзывы: