background image

CY8CKIT-046 PSoC® 4 L-Series Pioneer Kit Guide, Doc. #: 002-03344 Rev. *D

39

Code Examples

Table 4-3.  CapSense Gestures and Actions

Gesture

Gesture Activation

Action (Mouse/Keyboard)

Action (RGB LED)

Left button tap

a

Mouse left-click

None

Right button tap

Mouse right-click

None

Middle button tap

b

Mouse center-click

Turn ON/OFF RGB 
LED

Right swipe

c

CTRL+TAB

None

Содержание CY8CKIT-046

Страница 1: ...CY8CKIT 046 PSoC 4 L Series Pioneer Kit Guide Doc 002 03344 Rev D Cypress Semiconductor 198 Champion Court San Jose CA 95134 1709 www cypress com...

Страница 2: ...y 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 erra...

Страница 3: ...17 2 3 Uninstall Software 19 3 Kit Operation 20 3 1 Theory of Operation 20 3 2 KitProg 24 3 3 Programming and Debugging the PSoC 4200L Device 24 3 3 1 Programming using PSoC Creator 25 3 3 2 Debuggin...

Страница 4: ...tput 42 4 7 USB Audio 43 4 7 1 Project Description 43 4 7 2 Hardware Connections 47 4 7 3 Verify Output 49 A Appendix 52 A 1 PSoC 4 L Series Pioneer Kit Schematics 52 A 2 Hardware Functional Descripti...

Страница 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...

Страница 6: ...h a workstation 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 Handli...

Страница 7: ...protocol or shields with similar header I Os can be interfaced simultaneously In addition this kit features two CapSense proximity headers a CapSense Gesture Pad with a radial slider audio jack 3 5 mm...

Страница 8: ...6 PSoC 4 L Series Pioneer Kit Inspect the contents of the kit if you find any part missing contact your nearest Cypress sales office for help 1 2 Board Details The PSoC 4 L Series Pioneer Kit consists...

Страница 9: ...UJCMF NBJO CPBSE QPXFS IFBEFS 3 SEVJOP DPNQBUJCMF NBJO CPBSE 0 IFBEFST 6TFS CVUUPO 48 14P DVSSFOU NFBTVSFNFOU KVNQFS 14P 64 DPOOFDUPS VEJP 0 8 4 6 ZQSFTT OFSHZ BSWFTUJOH 1 4 6 SEVJOP DPNQBUJCMF TIJFME...

Страница 10: ...VDD IOREF RESET RESET V 3 3 3 3 V V 5 0 5 V GND GND GND GND VIN Vin GND VLCD VO RS P11_5 R nW P11_6 EN P11_4 NC NC NC NC D4 P11_0 D5 P11_1 D6 P11_2 D7 P11_3 BKLT GND P1_4 A0 P1_5 A1 P1_6 A2 P1_7 A3 P2...

Страница 11: ...to tap into an entire tool ecosystem with integrated compiler chains and production programmers for PSoC devices For more information visit www cypress com psoccreator 1 3 1 PSoC Creator Code Example...

Страница 12: ...d up your design process by starting you off with a complete basic design You can then adapt that design to your application Figure 1 5 Code Examples in PSoC Creator Figure 1 6 Code Examples with Samp...

Страница 13: ...amming debugging and the USB UART and USB I2C bridges The Code Examples chapter on page 27 describes multiple PSoC 4200L code examples that will help you understand how to create your own PSoC 4 proje...

Страница 14: ...embedded systems on Cypress Developer Community Forums 1 6 Technical Support For assistance visit Cypress Support or contact customer support at 1 800 541 4736 Ext 3 in the USA or 1 408 943 2600 Ext 3...

Страница 15: ...ory GPIO general purpose input output HID human interface device I2C Inter Integrated Circuit I2S Inter IC Sound IDE integrated design environment ILO internal low speed oscillator IMO internal main o...

Страница 16: ...eries Pioneer Kit Guide Doc 002 03344 Rev D 16 Introduction USB universal serial bus USB IF USB Implementers Forum WCO watch crystal oscillator WDT watchdog timer Table 1 2 Acronyms Used in the Docume...

Страница 17: ...kages If these packages are not on your computer the installer directs you to download and install them from the Internet b CY8CKIT 046 Kit Only This executable file installs only the kit contents whi...

Страница 18: ...tomatically installs the required software if it is not present on your computer Following are the required software a PSoC Creator 4 2 This software is available for download separately at www cypres...

Страница 19: ...ies Pioneer Kit Default location Windows OS 64 bit C Program Files x86 Cypress CY8CKIT 046 PSoC 4 L Series Pioneer Kit Windows OS 32 bit C Program Files Cypress CY8CKIT 046 PSoC 4 L Series Pioneer Kit...

Страница 20: ...the PSoC 4 L Series Pioneer Kit PSoC4200L Architecture 32 bit AHB Lite Deep Sleep Hibernate Active Sleep CPU Subsystem SRAM 32 KB SRAM Controller ROM 8 KB ROM Controller FLASH 256 KB Read Accelerator...

Страница 21: ...ck 3 5 mm CapSense Gesture Pad Proximity Proximity EZ BLE uSD Card NOR Flash F RAM Level Translator 2 I2C 6 6 USB I2C USB UART USB SPI SWD 2 I2C Reset Button Status LED 10 pin Debug Reset 10 pin Debug...

Страница 22: ...9 Cypress F RAM FM24V10 G U6 This kit features a Cypress F RAM device of 1 Mb capacity The F RAM is connected to the I2C interface of the PSoC 4200L device The F RAM device can be used similar to an e...

Страница 23: ...e Gesture Pad EZ BLE and SD card or Serial NOR Flash See sec tion A 2 3 2 Using the Shield Board on page 72 for details on using the shield board as an Arduino shield 22 CapSense Proximity Headers J22...

Страница 24: ...r supports both AHJ and OMTP headsets The user is required to select the headset type using the switch SW4 31 17 2032 MHz External Crystal Y2 The PSoC 4 L Series Pioneer Kit includes a 17 2032 MHz ext...

Страница 25: ...always use USB connector J10 Figure 3 4 Connecting the PSoC 4 L Series Pioneer Kit KitProg USB to a Computer 2 Open the desired project or Workspace in PSoC Creator from File Open Project Workspace T...

Страница 26: ...to program the kit 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 hardwired on the board with UART RX assigned...

Страница 27: ...n directory 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 4 1 Using t...

Страница 28: ...is generated after a successful build process Figure 4 2 Build Code Example from PSoC Creator 5 Connect the PSoC 4 L Series Pioneer kit to the PC using the KitProg USB connector J10 as described in P...

Страница 29: ...cquire button as shown in Figure 4 4 Figure 4 4 Port Acquire 8 After the device is acquired it is shown in a tree structure below the KitProg serial_number Click the Connect button and then OK to exit...

Страница 30: ...e CapSense tuner can be launched by right clicking the CapSense com ponent in TopDesign and selecting Launch Tuner Refer to the Manual Tuning section in AN85951 PSoC 4 and PSoC 6 MCU CapSense Design G...

Страница 31: ...clock signal for better ILO accuracy The calibrated LFCLK is used to source the watchdog timer 4 2 2 Hardware Connections No specific hardware connections are required for this example All connections...

Страница 32: ...2 5 mA at 3 3 V This results in an average current consumption of 1 25 mA at 3 3 V for the system including the LED current Note that the Debug SWD port is disabled in the example to reduce power con...

Страница 33: ...ond CapSense channel CSD1 CMOD and CTANK if used pins should be selected appropriately See A 2 1 13 CapSense Circuit on page 65 for details on the CMOD and CTANK pin connections for both the CapSense...

Страница 34: ...ty detection using PCB trace loops does not require this practice as they are properly shielded Power consumed by PSoC 4200L for this example can be measured using an ammeter as described in DeepSleep...

Страница 35: ...dependent on the LFCLK accuracy This example uses the 32 768 kHz WCO in the kit as the LFCLK source This offers a 250 ppm accuracy on the time If the WCO is not used or available the ILO can be used t...

Страница 36: ...oser to the proximity sensors 6 Wave the hand at a close proximity from the bottom sensor to the top sensor Wave UP gesture to see the LED color change in the order red green blue red one color at a t...

Страница 37: ...e tuner For more details see Using CapSense Tuner on page 30 Figure 4 16 CapSense Gesture Pad Pattern on the PSoC 4 L Series Pioneer Kit 4 5 2 Hardware Connections Connect a five inch wire the green w...

Страница 38: ...ng the CapSense Gesture Pad present in the CY8CKIT 046 PSoC 4 L Series Pioneer Kit In addition to emulating mouse keyboard over USB the example also controls the RGB LED intensity Figure 4 16 shows th...

Страница 39: ...xamples Table 4 3 CapSense Gestures and Actions Gesture Gesture Activation Action Mouse Keyboard Action RGB LED Left button tapa Mouse left click None Right button tap Mouse right click None Middle bu...

Страница 40: ...ipe CTRL SHIFT TAB None Up swipe and hold Scroll up None Down swipe and hold Scroll down None Inner clockwised None Change RGB LED color Violet Indigo Blue Green Yellow Orange Red Violet Table 4 3 Cap...

Страница 41: ...the example a tap is defined as touch and release in less than one second b Middle button tap is activated ONLY when the middle button Sensor 1 alone is activated touched c The CapSense series resist...

Страница 42: ...B Header 4 6 3 Verify Output To verify the USB mouse code example follow these steps 1 Power the PSoC 4 L Series Pioneer Kit through USB connector J10 2 Program the PSoC 4 L Series Pioneer Kit with th...

Страница 43: ...transfer between the USB and I2S interface The USB to I2S dataflow has multiple stages for streaming as both data rates are different Audio data packets from the USB arrive once every millisecond wher...

Страница 44: ...Speed USB With this data the USB host can adjust the number of samples per packet it transfers in subsequent cycles The high level data flow is as follows 1 Every 1 millisecond transfer the entire USB...

Страница 45: ...Doc 002 03344 Rev D 45 Code Examples Table 4 4 CapSense Gestures and Media Control Actions Gesture Gesture Activation Media Control Left button tap Previous track Right button tap Next track Middle bu...

Страница 46: ...ies Pioneer Kit Guide Doc 002 03344 Rev D 46 Code Examples Down button tap Stop Right swipe Next track Left swipe Previous track Table 4 4 CapSense Gestures and Media Control Actions Gesture Gesture A...

Страница 47: ...output The kit ships with a stereo audio earphone with microphone which can be used to test the example To test the example perform the following hardware connections and settings Up swipe and hold V...

Страница 48: ...default supports AHJ type connectors A footprint for an audio plug selection switch SW4 is provided on the bottom side of the board This switch can be populated after removing R111 R112 and is used to...

Страница 49: ...ug from the external audio device earphone with microphone to the audio jack J16 4 If populated set the audio jack selection switch SW4 to the appropriate position as explained in 4 7 2 Hardware Conne...

Страница 50: ...SoC 4 L Series Pioneer Kit Guide Doc 002 03344 Rev D 50 Code Examples Figure 4 22 Selecting CY8CKIT 046 USB Audio as Default Playback Device Figure 4 23 Selecting CY8CKIT 046 USB Audio as Default Reco...

Страница 51: ...of audio between the kit and the PC Figure 4 24 Setting Audio Sample Rate for Speakers 7 Use the gestures described in Table 4 4 to control the audio streaming and playback Note that the volume contro...

Страница 52: ...CY8CKIT 046 PSoC 4 L Series Pioneer Kit A3 2 Monday October 12 2015 Title Size Document Number Date Sheet of CYPRESS SEMICONDUCTOR 2015 630 60271 01 CY8CKIT 046 PSoC 4 L Series Pioneer Kit A3 2 Monday...

Страница 53: ...mber Rev Date Sheet of CYPRESS SEMICONDUCTOR 2015 630 60271 01 06 CY8CKIT 046 PSoC 4 L Series Pioneer Kit A3 3 8 Monday October 12 2015 Title Size Document Number Rev Date Sheet of CYPRESS SEMICONDUCT...

Страница 54: ...Date Sheet of CYPRESS SEMICONDUCTOR 2015 630 60271 01 06 CY8CKIT 046 PSoC 4 L Series Pioneer Kit A3 4 8 Monday October 12 2015 Title Size Document Number Rev Date Sheet of CYPRESS SEMICONDUCTOR 2015 6...

Страница 55: ...P5_3 P5_4 XRES P0_7 SPI_MOSI SPI_SSEL SPI_MISO I2C_SDA SPI_SCLK I2C_SCL RESET SWDIO SWDCLK UART RX UART TX P3_2 P3_3 XRES P4_0 P4_1 P6_3 P6_0 P6_1 P6_2 P3_1 P3_0 P4_1 P4_0 P12_0 P12_1 BLE_XRES Title...

Страница 56: ...KIT 046 PSoC 4 L Series Pioneer Kit A3 6 8 Monday October 12 2015 Title Size Document Number Rev Date Sheet of CYPRESS SEMICONDUCTOR 2015 630 60271 01 06 CY8CKIT 046 PSoC 4 L Series Pioneer Kit A3 6 8...

Страница 57: ...1 06 CY8CKIT 046 PSoC 4 L Series Pioneer Kit A3 7 8 Monday October 12 2015 Title Size Document Number Rev Date Sheet of CYPRESS SEMICONDUCTOR 2015 630 60271 01 06 CY8CKIT 046 PSoC 4 L Series Pioneer K...

Страница 58: ...to the onboard devices and peripherals The PSoC 5LP device can also be reprogrammed to provide other user functions The PSoC 5LP connects to the 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20 21 22...

Страница 59: ...rd USB connectors J10 or J11 5 V to 12 V power from Arduino shield or VIN header J13 VIN The PSoC 4 L Series Pioneer Kit can be powered at 5 V directly from the USB An LDO U2 marked 31 in Figure A 1 g...

Страница 60: ...sumption a header is populated in series with the power supply to the PSoC 4200L This header is used to measure current using an ammeter without the need to de solder any components from the board mar...

Страница 61: ...minal of the ammeter to pin 4 of J14 Connect the negative terminal of the external voltage supply to a GND pin on the board Figure A 6 shows the required connec tions Note that this powers the PSoC 42...

Страница 62: ...bout onboard peripheral connections to the pins on the headers Functionality of Header J12 unpopulated The J12 header is a 2 3 header that supports Arduino shields This header is used on a small sub s...

Страница 63: ...pins These pins are hardwired to 00 on the board By default the address of the F RAM device used on the kit is 0x50 This address can be modified by changing the R36 R37 A1 and R30 R31 A2 resistor pai...

Страница 64: ...page 43 for a demonstration of audio streaming using the PSoC 4200L USB On the ana log audio input output side the codec connects to a standard 3 5 mm TRRS audio jack marked 29 in Figure A 1 on page 5...

Страница 65: ...Design Guide This kit also supports CapSense designs that enable waterproofing On this kit the shield signal is connected to a GPIO pin P0 2 or ground by resistors R74 and R73 respectively By default...

Страница 66: ...face I2S clock signals from PSoC 4200L to 3 3 V to be used with the F RAM and audio codec as shown in Figure A 9 The level translator on the shield board U10 translates the SPI signals from PSoC 4200L...

Страница 67: ...y Headers The shield board contains two headers J21 and J22 for CapSense proximity wire connection marked 22 in Figure A 1 on page 58 If the proximity functionality is not being used these pins can be...

Страница 68: ...main board Arduino shield compatible headers J1 J2 J3 J4 as shown in Figure A 10 When the shield board is snapped the even pins 2 4 6 and so on act as Arduino shield headers After the board is snappe...

Страница 69: ...L and to EZ BLE position to program the EZ BLE PRoC Module In addition the EZ BLE PRoC Module can be independently programmed and debugged through the 5 pin SWD header marked 25 in Figure A 1 on page...

Страница 70: ...eld board The SD card can be interfaced over SPI lines P10 0 to P10 3 of PSoC 4200L The SD connector shares footprint and connections with the serial NOR Flash memory U13 Refer to Bill of Materials on...

Страница 71: ...of the kit Figure A 13 shows the boards after separation After snapping out the main board acts as an Arduino baseboard and the shield board can be used as an Arduino shield board Figure A 13 CY8CKIT...

Страница 72: ...ails are captured in Known Limitations after Board Separation on page 74 Figure A 14 CY8CKIT 046 Main Board Shield Board Interface through J26 J27 A 2 3 2 Using the Shield Board The separated shield b...

Страница 73: ...gure A 16 CY8CKIT 046 Shield Board as Arduino Shield with CY8CKIT 044 The shield pins that connect to the baseboard are also connected to CapSense Gesture Pad ele ments 13 sensors CapSense proximity s...

Страница 74: ...ming header marked 25 in Figure A 1 on page 58 to program the EZ BLE device if populated on the shield board In REV05 version of the PSoC 4 L Series Pioneer board when the shield board is used as an A...

Страница 75: ...V10 G used on the PSoC 4 L Series Pioneer board the slave ID is 1010b Device select bits are set using the two physical pins A2 and A1 The setting of these two pins on the PSoC 4 L Series Pioneer boar...

Страница 76: ...r and slave will then be enabled for speeds up to 3 4 MHz A STOP condition will exit Hs mode Single and multiple byte reads and writes are supported Figure A 20 F RAM I2C Data Format for Hs mode A 3 3...

Страница 77: ...n the memory and the mem ory generates an acknowledgement condition For Current Address Read and Sequential Read the bus master sends only the slave address The memory address used is the same address...

Страница 78: ...offers another set of Arduino compatible pins The pins present in the side board are completely independent of the ones present in the main board and hence offer the ability to use two Arduino shield...

Страница 79: ...Arduino Compatible Header Pin Map Arduino Pin Pioneer Series Kits CY8CKIT 042 CY8CKIT 040 CY8CKIT 042 BLE CY8CKIT 044 CY8CKIT 046 1 A0 P2 0 P0 0 P3 0 P2 0 P2 0 2 P0 2 a P2 0 P2 6 a P3 6 a a These pins...

Страница 80: ...section for connection details P0 0 P6 0 P6 0 8 P6 0 9 D12 P3 1 P3 1 P0 1 P6 1 P6 1 10 P6 1 11 D13 P0 6 P1 7 P0 3 P6 2 P6 2 12 P6 2 13 GND GND GND GND GND GND 14 GND 15 AREF P1 7 NC VREF P1 7 VREF 16...

Страница 81: ...its CY8CKIT 046 Shield Board 1 VIN VIN 2 VIN VIN 3 GND GND 4 GND GND 5 GND GND 6 GND GND 7 5V V5 0 8 5V V5 0 9 3 3V V3 3 10 3 3V V3 3 11 RESET RESET 12 RESET RESET 13 IOREF VDD 14 IOREF VDD 15 NC NC 1...

Страница 82: ...6 CS_SHLD 5 D10 P10 3 6 P10 3 7 D11 P10 0 8 P10 0 9 D12 P10 1 10 P10 1 11 D13 P10 2 12 P10 2 13 GND GND 14 GND 15 AREF VREF 16 VREF 17 SDA P12 1 18 P12 1 19 SCL P12 0 20 P12 0 Table A 10 J20 Arduino...

Страница 83: ...CS_LS_E0 P4 4 CS_GES_CR P0 6 CS_GES_CR 2 CapSense Sensor 2 P1 2 CS_LS_E1 P2 2 CS_LS_E1 P4 5 CS_GES_UP P4 5 CS_GES_LT 3 CapSense Sensor 3 P1 3 CS_LS_E2 P2 3 CS_LS_E2 P4 6 CS_GES_LT P4 4 CS_GES_UP 4 Ca...

Страница 84: ...oC 4 L Series Pioneer Kit Table A 12 Proximity Header Pin Map Proximity Pin Pioneer Series Kits CY8CKIT 042 CY8CKIT 040 CY8CKIT 042 BLE CY8CKIT 044 CY8CKIT 046 1 PROX0 P2 0 P2 0 P3 7 P9 4 2 PROX1 P3 6...

Страница 85: ...mode by holding the Reset button during kit power up Release the Reset button and re plug the kit if you entered this mode by mistake If the mode entry was intentional bootload the new cyacd file usi...

Страница 86: ...C1005X7R1C103K050B A 10 1 C41 220 pF CAP CER 220PF 50V 5 C0G 0603 TDK Corporation C1608C0G1H221J080A A 11 1 C44 10 uFd 20v CAP TANT 10UF 20V 10 1210 AVX Corporation TAJB106K020RNJ 12 5 C45 C46 C51 C5...

Страница 87: ...6GEY0R00V 39 2 R9 R14 15K RES 15K OHM 1 10W 5 0603 SMD Panasonic ECG ERJ 3GEYJ153V 40 1 R10 220 ohm RES SMD 220 OHM 1 1 10W 0603 Panasonic ECG ERJ 3EKF2200V 41 2 R16 R17 22E RES 22 OHM 1 10W 1 0603 SM...

Страница 88: ...Kobiconn 151 8010 E 69 1 J14A Install jumper across pins 3 and 4 Rectangular Connectors MINI JUMPER GF 6 0MM CLOSE TYPE BLACK Kobiconn 151 8010 E Label 70 1 N A N A LBL PCA Label Vendor Code Date code...

Страница 89: ...8W 0805 SMD Panasonic ECG ERJ 6GEY0R00V 94 2 R56 R81 4 7K RES 4 7K OHM 1 10W 5 0603 SMD Panasonic ECG ERJ 3GEYJ472V 95 2 R100 R102 6 8M RES ZERO OHM 1 10W 0603 SMD Vishay Dale CRCW06036M80FKEA 96 1 R...

Страница 90: ...UART for Data Monitoring on page 30 Added CapSense Buttons on page 36 Added USB Audio on page 43 Updated Appendix chapter on page 52 Updated PSoC 4 L Series Pioneer Kit Schematics on page 52 Updated...

Страница 91: ...ge 13 Updated description Updated Getting Started on page 13 Updated description Updated Additional Learning Resources on page 13 Updated description Updated Technical Support on page 14 Updated descr...

Страница 92: ...e 26 Updated description Updated USB UART Bridge on page 26 Updated description Updated USB I2C Bridge on page 26 Updated description Updated Updating the KitProg Firmware on page 26 Updated descripti...

Страница 93: ...ced footprint only with unpopulated in heading Updated SD Card Interface J25 unpopulated on page 70 Replaced footprint only with unpopulated in heading Updated Serial NOR Flash Memory U13 unpopulated...

Отзывы: