background image

CY8CKIT-040 PSoC

®

 4000 Pioneer Kit Guide, Doc. # 001-91316 Rev. *F

29

4.

Hardware

4.1

Board Details

The PSoC 4000 Pioneer Kit consists of the following blocks:

CY8CKIT-040 baseboard (see 

Figure 4-1

) -

PSoC 4 (4000 family)

PSoC 5LP

Power supply system

Coin cell battery holder (BT1)

Programming interfaces (J6, and J10)

Arduino-compatible headers (J1, J2, J3, J4, and J12)

PSoC 5LP GPIO header (J8)

Proximity header (J5)

Pioneer board LEDs

Push button (Reset button)

Cypress ferroelectric RAM (F-RAM)

CY8CKIT-040 CapSense Trackpad shield board (see 

Figure 4-2

)

Note:

 Programming header J7 is not populated by default.

Содержание CY8CKIT-040 PSoC 4000 Pioneer Kit

Страница 1: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F Cypress Semiconductor 198 Champion Court San Jose CA 95134 1709 www cypress com...

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

Страница 3: ...You Begin 15 2 2 Install Software 15 2 3 Install Hardware 17 2 4 Uninstall Software 18 3 Kit Operation 19 3 1 Kit Overview 19 3 2 Kit USB Connection 21 3 3 Programming and Debugging PSoC 4000 22 3 3 1...

Страница 4: ...SB I2C Bridge 105 6 2 Using FM24W256 F RAM 113 6 2 1 Address Selection 113 6 2 2 Write Read Operation 114 6 2 3 Example Firmware 115 6 3 Using PSoC 5LP as a USB UART Bridge 118 6 4 Developing Applicat...

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

Страница 6: ...n If an ESD workstation is not available use appropriate ESD protection by wearing an antistatic wrist strap attached to the chassis ground any unpainted metal surface on the board when handling parts...

Страница 7: ...is based on the PSoC 4000 device family delivering a programmable platform for a wide range of embedded applications The PSoC 4000 is the smallest member of the PSoC 4 platform with support for CapSen...

Страница 8: ...8 Introduction Figure 1 1 Kit Contents Inspect the contents of the kit if you find any part missing contact your nearest Cypress sales office for help www cypress com go support Download the latest ve...

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

Страница 10: ...Find Example Project dialog shown in Figure 1 4 on page 11 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 keywor...

Страница 11: ...n addition to the examples built into PSoC Creator this kit includes a simple example which can be used to quickly evaluate the functionality of this kit The example is described in the Code Examples...

Страница 12: ...ator Components Starter designs Choose File New Project PSoC 4000 Starter Designs These starter designs demonstrate the unique features of PSoC 4 System Reference Guide Choose Help System Reference Gu...

Страница 13: ...electors PSoC 1 PSoC 3 PSoC 4 or PSoC 5LP In addition PSoC Creator includes a device selection tool Datasheets Describe and provide electrical specifications for the PSoC 4000 device family CapSense D...

Страница 14: ...you need quick assistance Self help Local Sales Office Locations 1 6 Documentation Conventions Table 1 1 Document Conventions for Guides Convention Usage Courier New Displays file locations user ente...

Страница 15: ...it contents which include kit code examples hardware files and user documents This package can be used if all the software prerequisites listed in step 5 are installed on your PC b CY8CKIT 040 Kit Set...

Страница 16: ...nstall CY8CKIT 040 to start the kit installation as shown in Figure 2 1 Figure 2 1 Kit Installer Startup Screen 4 Select the folder in which you want to install the CY8CKIT 040 kit related files Choos...

Страница 17: ...ormation or select the check box Continue Without Contact Information Click Finish to complete the CY8CKIT 040 kit installation 10 After the installation is complete the kit contents are available at...

Страница 18: ...eer Kit software using one of the following methods Go to Start All Programs Cypress Cypress Update Manager Cypress Update Man ager Select the Uninstall button that corresponds to the kit software Go...

Страница 19: ...oard and shield board with a markup of the onboard components Figure 3 1 CY8CKIT 040 Kit Details Proximity Header J5 PSoC 4 Power Supply Jumper J13 Cypress F RAM 256 Kb PSoC 4000 24 QFN PSoC 4 Reset B...

Страница 20: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 20 Kit Operation...

Страница 21: ...under the Device Manager in the Windows operating system See Table 3 1 and Figure 3 3 Figure 3 2 Kit USB Connection Table 3 1 PSoC 4000 Pioneer Kit in Device Manager After Enumeration Figure 3 3 KitP...

Страница 22: ...reator and PSoC Programmer must be installed See Install Software on page 15 for information on installing the kit software 1 To program the device plug the USB cable into the programming USB connecto...

Страница 23: ...he board can either be powered by the USB VBUS or by an external source such as an Arduino shield see Power Supply System on page 36 If the board is already powered from another source plugging in the...

Страница 24: ...tents It can be pur chased from the Cypress Online Store Figure 3 8 PSoC 4 Programming Debug Using MiniProg3 Figure 3 9 MiniProg3 Configuration in PSoC Creator Note Ensure that both MiniProg3 with or...

Страница 25: ...er the USB to the USB I2 C software utility on the PC called the Bridge Control Panel BCP The BCP is available as part of the PSoC Programmer installation This software can be used to send and receive...

Страница 26: ...A P1_3 lines of the PSoC 4 I2C The USB I2C bridge currently supports I2C speed of 50 kHz 100 kHz 400 kHz and 1 MHz See Using PSoC 5LP as a USB I2C Bridge on page 105 for building a project that uses t...

Страница 27: ...ugh zero ohm resistor R57 Table 3 2 lists the specifications supported by the USB UART bridge Table 3 2 Specifications Supported by USB UART Bridge 3 6 Updating the Onboard Programmer Firmware The fir...

Страница 28: ...te to the Utilities tab and click the Upgrade Firmware button as shown in Figure 3 13 Figure 3 13 Upgrade Firmware Message in PSoC Programmer Click the Utilities tab and then the Upgrade Firmware butt...

Страница 29: ...SoC 4 4000 family PSoC 5LP Power supply system Coin cell battery holder BT1 Programming interfaces J6 and J10 Arduino compatible headers J1 J2 J3 J4 and J12 PSoC 5LP GPIO header J8 Proximity header J5...

Страница 30: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 30 Hardware Figure 4 1 CY8CKIT 040 Baseboard Details Coin Cell Battery Hoder BT1...

Страница 31: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 31 Hardware Figure 4 2 CY8CKIT 040 CapSense Trackpad Shield Board Details Figure 4 3 PSoC 4000 Pioneer Kit Pin Mapping...

Страница 32: ...age 130 The kit includes an RGB LED a status LED and a power LED The RGB LED is connected to the PSoC 4 and the status LED is connected to the PSoC 5LP This kit also includes a Reset button that conne...

Страница 33: ...upt and I2C address detect Capacitive Sensing Cypress Capacitive Sigma Delta CSD provides best in class signal to noise ratio SNR and water tolerance Cypress supplied software component makes capaciti...

Страница 34: ...urity features Up to 32 KB flash error correcting code ECC or configuration storage Up to 64 KB SRAM 2 KB electrically erasable programmable read only memory EEPROM memory 1M cycles and 20 years reten...

Страница 35: ...ith 8 to 20 bit resolution Sample rates up to 192 ksps Programmable gain stage 0 25 to 16 12 bit mode 192 ksps 66 dB signal to noise and distortion ratio SINAD 1 bit INL DNL 16 bit mode 48 ksps 84 dB...

Страница 36: ...y 3 3 V and 5 V to the I O headers and receive 3 3 V from the I O headers J9 should select 3 3 V for this The board can also be pow ered with an external power supply through the VIN J11 header the al...

Страница 37: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 37 Hardware...

Страница 38: ...shorts and over current The MOSFET based protection circuit provides overvoltage and reverse voltage protection to the 3 3 V rail The PMOS Q1 protects the board components from a reverse voltage condi...

Страница 39: ...eter and the negative termi nal of the ammeter to the lower pin P4 VDD of J13 Figure 4 7 shows the required connections Figure 4 7 PSoC 4 Current Measurement When Powered Separately Note The RGB trico...

Страница 40: ...J1 header contains I O pins for reset and power supply line The J2 header is an analog port Because of limited analog support in PSoC 4000 family it con tains general purpose digital I O pins only Th...

Страница 41: ...ity of Unpopulated Header J12 The J12 header is a 2 3 header that supports Arduino shields This header is used on a small sub set of shields and is unpopulated on the PSoC 4000 Pioneer Kit Note The J1...

Страница 42: ...PSoC 5LP GPIO Header J8 A limited set of PSoC 5LP pins are brought to this header Refer to Developing Applications for PSoC 5LP on page 130 for details on how to develop custom applications See Pin A...

Страница 43: ...he device can be configured as a shield signal to enable waterproof operation How ever if a shield tank capacitor is required in the design Capacitor C5 CTANK on the board needs to be populated with t...

Страница 44: ...of power supplied to the board The kit also has a general purpose tricolor RGB LED LED3 for user applications that connect to specific PSoC 4 pins Jumper J14 is provided to enable disable power to the...

Страница 45: ...and RGB LED 4 3 1 9 Push Buttons The kit contains only a Reset push button as shown in Figure 4 16 The Reset button is connected to the XRES pin of PSoC 4 and is used to reset the onboard PSoC 4 devi...

Страница 46: ...t wide and the LSB three bits are configurable through physical pins and are hardwired to 000 on the board By default the address of the F RAM device used on the board is 0x50 This can be modified by...

Страница 47: ...used for CapSense is connected to pin P0 4 and an optional bleeder resistor R1 can be connected across the Cmod The Trackpad shield is Arduino compati ble and can also be used with the PSoC 4 Pioneer...

Страница 48: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 48 Hardware Figure 4 18 CapSense Trackpad Shield Board...

Страница 49: ...es page This webpage lists all PSoC Creator code examples available across application notes kits and PSoC Creator 5 1 1 Programming the Example Projects This section is provided as a reference for pr...

Страница 50: ...en erate the hex file as shown in Figure 5 2 Figure 5 2 Build Project from PSoC Creator 4 To program connect the board to a computer using the USB cable connected to port J10 as described in Kit USB C...

Страница 51: ...will open the Select Debug Target window Select KitProg ID and click the Port Acquire button as shown in Figure 5 4 Figure 5 4 Acquire Device from PSoC Creator 7 After the device is acquired it is lis...

Страница 52: ...uired along with SWD debug then follow these steps a Route TX pin to any other available pin by modifying the TX_PORT TX_PIN macro available in the main h file of the projects b Remove resistor R57 Fi...

Страница 53: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 53 Code Examples Figure 5 7 R57 Location on the Board Figure 5 8 Debug Port Pin Functionality Selection...

Страница 54: ...es a PWM block to blink the red LED of the RGB LED as shown in Figure 5 9 The PWM output is connected to pin P3_2 red of the RGB LED The PWM block is configured as a digital clock signal generator wit...

Страница 55: ...001 91316 Rev F 55 Code Examples 5 2 2 Project Description 5 2 2 1 PSoC Creator Component Configuration PWM TCPWM mode The TCPWM Component is configured as a PWM with the parameters shown in Figure 5...

Страница 56: ...0_Blinking_LED cydwr under the Source vertical tab in the Workspace Explorer and select the suitable pin as shown in Figure 5 12 Figure 5 12 Pin Selection for Blinking LED Project 5 2 3 Verify Output...

Страница 57: ...CKIT_040_Proximity_UART cyprj implements a capacitive proximity sensor con trolling the brightness of a LED The project configures the sensor as a CapSense proximity widget with SmartSense Auto tuning...

Страница 58: ...NR Raw data noise filter First Order IIR 1 4 Filter out noise or unwanted spikes in raw count This setting can be tweaked based on require ment ProximitySensor0 Widgets Config Add a proximity sensor b...

Страница 59: ...d macro for the 15 bit PRSm Though the output of PRSm has a variable frequency with a maximum frequency of 8 MHz 16 MHZ 2 the repeat rate of PRSm is considered to be the period in this context Note Th...

Страница 60: ...SoC 5 LP UART bridge or the CY3240 bridge config ured as a UART bridge as documented in AN2397 Figure 5 15 Software UART TX Component Parameters Pin_LED Digital Output Pin The digital output pin is us...

Страница 61: ...nd Header Files in the CapSense Proximity Project File Names Purpose main c This file contains all the function definitions used in the firmware main h This file contains all the macros used in the fi...

Страница 62: ...he calculated brightness The system data such as sensor raw data baseline signal and calculated LED brightness are sent over the UART TX line The device monitors the activity on the proximity sensor a...

Страница 63: ...The array s size is equal to the total number of sensors The CapSense_SensorBase line array is updated by these functions CapSense_InitializeSensorBaseline CapSense_InitializeAllBaselines CapSense_Up...

Страница 64: ...be part of the scanning process Proximity widgets are disabled by default in the component the user needs to call this API along with the proximity widget number to enable the same to be included in t...

Страница 65: ...re checking for any activity on the sensor void CapSense_UpdateEnabled Baselines void The API applies selected filter to the CapSense_SensorRaw array and updates the CapSense_SensorBaseline array of a...

Страница 66: ...ed with the kit 4 inches in length is wound to form a loop of 1 to 2 inch diam eter the proximity range will be approximately the same as the loop diameter for a fast approaching hand To obtain a high...

Страница 67: ...2 byte header precedes the data bytes in the design it is 0x0D and 0x0A The 3 byte footer follows the data bytes and in this design consists of 0x00 0xFF and 0xFF The data bytes consists of proximity...

Страница 68: ...3_0 can be used as TX and is available only by disabling the debug feature of the chip If the debug feature is required along with TX then the zero ohm resistor connecting the TX and RX should be remo...

Страница 69: ...t the COM port and RX8 as the protocol as shown in Figure 5 21 Figure 5 21 Bridge Control Panel COM Port and Protocol Selection 5 Choose Tools Protocol Configuration or press F7 and configure the RX8...

Страница 70: ...dge Files in the Open window that appears Click OK to exit Figure 5 23 Bridge Control Panel Variable Settings 7 Choose File Open File and select the CapSense Proximity UART Editor iic file supplied wi...

Страница 71: ...ne and then click Repeat as shown in Figure 5 25 to start receiving the packets make sure you have powered the device and programmed with the project s firmware the TX is connected to the RX line of t...

Страница 72: ...ide Doc 001 91316 Rev F 72 Code Examples 9 You should start receiving data Click the Chart tab to view the graph as shown in Figure 5 26 Figure 5 26 Bridge Control Panel Chart for Viewing Debug Data S...

Страница 73: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 73 Code Examples Raw count and Baseline...

Страница 74: ...0 is interfaced through the PSoC 5LP based USB I2 C bridge to the PC GUI The project uses the SmartSense feature which sets all CapSense parameters to the optimum values automatically The parameter se...

Страница 75: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 75 Code Examples Figure 5 28 PSoC Creator Schematic Design of CapSense Trackpad Project with I2 C Tuner...

Страница 76: ...ment TouchPad0 Widgets Con fig Add and configure the touchpad as shown in Figure 5 29 Analog switch drive source Advanced PRS Auto Reduce EMI emission and enhance EMC immunity Sensor auto reset Disabl...

Страница 77: ...ode Examples Figure 5 29 CapSense Touchpad Parameters SCB EzI2C Mode The Serial Communication Block SCB configured in EzI2C mode is used for the CapSense Tuner The parameters of the Component are show...

Страница 78: ...Open CY8CKIT_040_CapSense_I2C cydwr in the Workspace Explorer and select the suitable pin Table 5 10 Pin Connection1 1 Trackpad_X0 Touchpad0_Col0_TP to Trackpad_X5 Touchpad0_Col5_TP maps to COL5 to C...

Страница 79: ...gram the code example and reset the device Launch the CapSense Tuner window as explained in the following steps 5 4 3 1 Launching Tuner Window The Tuner window from PSoC Creator must be up and running...

Страница 80: ...PSoC Creator and click Launch Tuner as shown in Figure 5 34 Figure 5 34 Launch Tuner 3 The Tuner window opens Click Configuration to open the configuration window as shown in Figure 5 35 Figure 5 35 T...

Страница 81: ...g tab A red outline is displayed on the selected sensor Different CapSense parameters are shown on the bottom right You cannot edit the settings because auto tuning is used in this project auto tuning...

Страница 82: ...PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 82 Code Examples 4 Select the sensor parameters to observe as shown in Figure 5 39 The graph of the selected parameters appears Figure 5 39 Sensor Para...

Страница 83: ...T 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 83 Code Examples 5 Touch a sensor or slider element and see the increase in Raw count and Signal as shown in Figure 5 40 Figure 5 40 Raw Count Inc...

Страница 84: ...of the device using a wire The LED intensity control is done using software Preci sion Illumination Signal Modulator PrISM The project details are discussed in Firmware Details on page 89 Figure 5 41...

Страница 85: ...nhanced EMC immunity Sensor auto reset Disabled Not required in the design Can be added if required by the application Low baseline reset 5 System dependent number Can be configured as per the user ne...

Страница 86: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 86 Code Examples Figure 5 42 CapSense Touchpad Parameters...

Страница 87: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 87 Code Examples Figure 5 43 Scan Order Tab in CapSense Component Configure Window...

Страница 88: ...acro available in main h Note By default P3 0 is used for TX in firmware and P3 0 is hardwired in CY8CKIT 040 to the PSoC 5LP USB UART bridge s RX line Therefore SWD debug cannot be used if P3 0 is us...

Страница 89: ...ey aspects of the firmware can be modified to meet a different application requirement using vari ous macros defined in the main h file Table 5 12 Source Files and Header Files in the Color Palette Pr...

Страница 90: ...les Firmware Flow Chart Figure 5 45 shows the flow chart of code implemented in main c Figure 5 45 Color Palette Project Flow Chart Start While 1 Loop Enable proximity and initialize all blocks CSD Pr...

Страница 91: ...Mode PROX_SCAN and exit sleep scan Yes End of loop A Scan all sensors including Prox Is Prox Active Mode SLEEP_SCAN and Enter Sleep Scan No End of loop Is Any Sensor Active Yes Update PrISM duty based...

Страница 92: ...kpad position Update PrISM duty based on color and brightness level Process co ordinates to obtain color and brightness detail Is any sensor active Yes Increment NO_ACT counter No Is NO_ACT 5 secs Mod...

Страница 93: ...on the touchpad or proximity sensor keeps the device in active scanning mode If all activity ceases the firmware will fade off the RGB color displayed and enter sleep scanning mode The timeline at whi...

Страница 94: ...alette and the saturation slider are both part of the Trackpad area The following steps summarize the flow 1 The Trackpad coordinates are obtained as shown in the mapping in Figure 5 48 Figure 5 49 sh...

Страница 95: ...window boundaries color _AREA_CENTER marks the center of a color window on whose either side the color will be at maximum intensity color _LIMIT_LEFT color _LIMIT_RIGHT macros mark the edge of each c...

Страница 96: ...um intensity white brighter Default saturation value at power ON is 50 percent or HALF_SATURATION value The amount by which each color darkens or brightens is proportional to the slider position s rel...

Страница 97: ...cro is commented out then the first type of packet is transmitted If the macro is present then the sec ond type of packet is sent Note To view the MINIMAL_TX data you can use BCP as explained in UART...

Страница 98: ...own in setup 1 in Figure 5 52 To use the firmware efficiently the proximity loop can be formed as a loop around the Trackpad as shown in Figure 5 53 With setup 2 the LED turns on to show the previous...

Страница 99: ...ouchpad0_Col0_TP to Trackpad_X5 Touchpad0_Col5_TP maps to COL5 to COL0 of the Trackpad so as to make the Trackpad x axis left aligned Pin Name Port Name Trackpad_X0 P0_3 Trackpad_X1 P0_7 Trackpad_X2 P...

Страница 100: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 100 Code Examples Figure 5 54 Pin Selection for Color Palette Project...

Страница 101: ...for a given series resistance because of higher luminosity to current ratio and lower voltage drop across them which results in higher current For such cases the brighter color s intensity can be limi...

Страница 102: ...ADC for PSoC 4000 family is included in the Component catalog Two examples are included with PSoC Creator to get started with the Component Both the examples make use of CY8CKIT 040 and some external...

Страница 103: ...e 5 57 Figure 5 57 Open Code Example from PSoC Creator 3 In the Find Example Project window set the Device family to PSoC 4000 and Keyword to CSD_ADC as shown in Figure 5 58 Figure 5 58 Setting the Fi...

Страница 104: ...T as well To learn more about the project refer to the ADC_VoltageInput pdf file that opens when creating the project The file is also available in the Workspace Explorer see Figure 5 59 Figure 5 59 P...

Страница 105: ...s as shown in these images 6 1 Using PSoC 5LP as a USB I2C Bridge The PSoC 5LP serves as a USB I2C bridge which can be used to communicate with the USB I2C software running on the PC Note Project CapS...

Страница 106: ...ag and drop an I2 C Component to the top design as shown in Figure 6 2 Figure 6 2 I2 C Component in Component Catalog 3 To configure the I2C Component double click or right click the I2C Component and...

Страница 107: ...PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 107 Advanced Topics 4 Configure the I2 C with the settings and click OK as shown in Figure 6 4 and Figure 6 5 Figure 6 4 I2 C Configuration Tab Figure...

Страница 108: ...pin P1 3 for the I2 C SDA in the Pins tab of project cydwr as shown in Figure 6 6 Figure 6 6 Pin Selection 6 Place the code available in USB_I2C main c which is attached to this PDF document in your m...

Страница 109: ...ock This is because to generate a 100 kbps I2 C clock the block needs a 1 6 MHz signal which cannot be derived from the default HFCLK setting of 12 MHz To remove the warning go to project_name cydwr C...

Страница 110: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 110 Advanced Topics 9 Connect to KitProg under Connected I2 C SPI RX8 Ports as shown in Figure 6 8 Figure 6 8 Connect to KitProg in BCP...

Страница 111: ...pen Protocol Configuration Window in BCP 11 To transfer data type the command shown in Figure 6 10 and press Enter or click the Send button in the BCP The log shows whether the transaction was success...

Страница 112: ...ure 6 12 The log shows whether the transaction was successful Figure 6 12 Read Data Bytes from the BCP Note See Help Contents under Help in the BCP or press F1 for details of the I2 C commands Indicat...

Страница 113: ...access It is hardwired to the PSoC 4000 I2 C lines P1_2 and P1_3 the same lines are routed to the PSoC 5LP I2 C lines as well Because the F RAM device is an I2 C slave it can be accessed or shared am...

Страница 114: ...ice datasheet includes details on how to perform a write read operation with the F RAM Figure 6 14 and Figure 6 15 provide a snapshot of the write read packet structure as a quick refer ence Figure 6...

Страница 115: ...ccessed From there on each byte accessed read write will increment this address by one and the count wraps around at the boundary 0x7FFF to 0x0000 for a 32 KB device The value can be reset at any time...

Страница 116: ...ct by choosing Build Build Project or pressing Shift F6 After the project builds without any errors and warnings program the device by pressing Ctrl F5 through the MiniProg3 or PSoC 5LP programmer in...

Страница 117: ...n changed as explained in Address Selection on page 113 then change the slave address in the command window replace 50 with the slave address in hex format 9 Do a write to the F RAM device by sending...

Страница 118: ...ure 6 20 Read Data From F RAM 6 3 Using PSoC 5LP as a USB UART Bridge The PSoC 5LP serves as a USB UART bridge which can communicate with the COM terminal soft ware This section explains how to use th...

Страница 119: ...de Doc 001 91316 Rev F 119 Advanced Topics 1 Create a new PSoC 4 project in PSoC Creator as shown in Figure 6 21 Select an appropriate location for your project and rename it as required Figure 6 21 C...

Страница 120: ...a UART SCB component from the Component Catalog shown in Figure 6 22 to the top design Figure 6 22 UART Component Under Component Catalog 3 To configure the UART double click or right click the UART...

Страница 121: ...oC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 121 Advanced Topics 4 Configure the UART as shown in Figure 6 24 Figure 6 25 and Figure 6 26 and then click OK Figure 6 24 Configuration Tab Figure 6 25 U...

Страница 122: ...in Figure 6 27 Figure 6 27 Pin Selection 6 Place the code available in USB_UART main c which is attached to this PDF document in your main c project file The code will echo any UART data received 7 B...

Страница 123: ...SoC 4000 device can be programmed debugged while using the RX line for external bridge The setup with CY8CKIT 001 CT8CKIT 038 and CY8CKIT 040 is provided for reference only on how to use the USB UART...

Страница 124: ...route the RX and TX pins to either one of the following subsets P0 4 P0 5 or P3 0 P3 1 or P4 0 P4 1 To communicate with the PSoC 4 from the terminal software follow this procedure 1 Connect USB Mini...

Страница 125: ...erminal choose File New Connection enter a name for the new connection and click OK as shown in Figure 6 31 Figure 6 31 Open New Connection HyperTerminal 3 For PuTTY double click the PuTTY icon and se...

Страница 126: ...port as shown in Figure 6 33 a In HyperTerminal select COMx or the specific communication port that is assigned to the Kit Prog USB UART in Connect using and click OK This code example uses COM12 b I...

Страница 127: ...re identical to the UART settings configured for PSoC 4 In PuTTY select Speed baud Data bits Stop bits Parity and Flow control under Configure the serial line shown in Figure 6 33 second image Click S...

Страница 128: ...Echo typed characters locally under File Properties Settings ASCII Setup to display the typed characters in HyperTerminal as shown in Figure 6 36 In PuTTY enable Force on under Terminal Line disciplin...

Страница 129: ...F 129 Advanced Topics Figure 6 37 Enable Echo of Typed Characters in PuTTY 7 The COM terminal software displays both the typed data and the echoed data from the PSoC 4 UART as shown in Figure 6 38 an...

Страница 130: ...ther a normal project or a bootloadable project using the PSoC 5LP The PSoC 5LP connections on the board are summarized in Figure 6 40 J8 is the I O connector see A 2 2 PSoC 5LP GPIO Header J8 The USB...

Страница 131: ...P should be based on the bootloader hex file which is programmed onto the kit The bootloader hex file is available in the kit files or can be downloaded from the kit webpage The hex files are included...

Страница 132: ...o build a bootloadable application for the PSoC 5LP follow this procedure 1 In PSoC Creator choose New Project PSoC 5LP click the expand button adjacent to Advanced and select the Device as CY8C5868LT...

Страница 133: ...oC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 133 Advanced Topics 2 Navigate to the schematic view and drag and drop a Bootloadable Component on the TopDesign Figure 6 43 Bootloadable Component in Com...

Страница 134: ...lecting the Dependencies tab in the configuration window and clicking the Browse button as shown in Figure 6 44 Select the Kit Prog_Bootloader hex and KitProg_Bootloader elf files click Open as shown...

Страница 135: ...CY8CKIT 040 PSoC 4000 Pioneer Kit Guide Doc 001 91316 Rev F 135 Advanced Topics Figure 6 45 Select KitProg Bootloader Hex File Figure 6 46 Select KitProg Bootloader Elf File...

Страница 136: ...lop your custom project 6 The NVL setting of the Bootloadable project and the KitProg_Bootloader project must be the same Figure 6 48 shows the KitProg_Bootloader cydwr system settings Figure 6 48 Kit...

Страница 137: ...ootloader Host tool which is available from PSoC Creator Choose Tools Bootloader Host as shown in Figure 6 49 Figure 6 49 Open Bootloader Host Tool from PSoC Creator 10 In the Bootloader Host tool cli...

Страница 138: ...e cyacd as shown in Figure 6 51 Figure 6 51 Open Bootloadable File from Bootloader Host Tool Figure 6 52 Select Bootloadable cyacd File from Bootloader Host 12 Click the Program button in the Bootload...

Страница 139: ...by the custom project For additional information on bootloaders refer to the Cypress application note AN73503 USB HID Bootloader for PSoC 3 and PSoC 5LP 6 4 2 Building a Normal Project for PSoC 5LP A...

Страница 140: ...ard 10 pin SWD debug and programming header J7 which needs to be populated 5 To program the PSoC 5LP with PSoC Creator choose Debug Program or press Ctrl F5 The Programming window shows MiniProg3 and...

Страница 141: ...PSoC 5LP device on this kit as explained in Developing Applications for PSoC 5LP on page 130 Reprogramming or bootloading the PSoC 5LP device with a new flash image will over write the factory program...

Страница 142: ...eer Kit Guide Doc 001 91316 Rev F 142 Advanced Topics 3 The following message shown in Figure 6 54 appears in the PSoC Programmer results window KitProg Bootloader device is detected Figure 6 54 PSoC...

Страница 143: ...ed Topics 4 Switch to the Utilities tab in PSoC Programmer and click the Upgrade Firmware button as shown in Figure 6 55 Unplug all other PSoC programmers such as MiniProg3 and DVKProg from the PC bef...

Страница 144: ...ter programming is completed the following message appears Firmware Update Finished at time as shown in Figure 6 56 Figure 6 56 Firmware Update Complete 6 The factory program is now successfully resto...

Страница 145: ...l 1 Launch the Bootloader Host tool from Start Cypress PSoC Creator Using the File Open menu load the Kit Prog cyacd file which is installed with the kit software The default location for this file is...

Страница 146: ...B A to Mini B This puts the PSoC 5LP into service mode which is indicated by the blinking green status LED 3 In the Bootloader Host tool set the filters for the USB devices with VID 04B4 and PID F13B...

Страница 147: ...LP is programmed with a standard application restore the factory program by using the fol lowing method 1 Launch PSoC Programmer 3 23 1 or later from Start Cypress PSoC Programmer 2 Use the File Open...

Страница 148: ...48 Advanced Topics 4 Ensure that MiniProg3 is the selected port in PSoC Programmer and the 10 pin connector 10p option is selected as shown in Figure 6 60 If the board is not powered over USB select t...

Страница 149: ...ical dashboard This tool helps in designing a simple GUI for development kit example projects with least effort Note that the Micrium C Probe tool is not a prerequisite software required to run this k...

Страница 150: ...mple projects of the kit to visualize the color palette output and proxim ity output on a GUI CY8CKIT_040_Color_Palette Example Project To visualize the output of the CY8CKIT_040_Color_Palette project...

Страница 151: ...sualize the RGB output Figure 6 63 Adding RGB Palette Control 6 Next add a Line Chart from Charts in the Toolbox onto the Datascreen to visualize the X Y posi tion of the finger on the trackpad Figure...

Страница 152: ...until the ELF file is loaded The ELF file is in the collapsed state by default It can expanded by clicking on the button next to the file name 10 On expanding the file you can see that the Symbol Bro...

Страница 153: ...variable cARGB on to the RGB Palette to see the RGB output Simi larly drag and drop xPos and yPos on to the Line Chart control to the see the X and Y position of the finger on the trackpad Figure 6 6...

Страница 154: ...utput to Line Chart Control 13 By default the Y axis of the Line Chart is plotted for values between 0 and 10000 To change the Y axis scale to 0 to100 click the Line Chart control In the Line Chart co...

Страница 155: ...s Editor change the Max property of Y axis to 100 Notes You may use the Series properties to change the line graph colors of xPos and yPos Also the Symbols Manager shows the global variables associate...

Страница 156: ...from the drop down list for Port and click OK to start communication between the CY8CKIT 040 and the C Probe tool Figure 6 74 C Probe Settings 17 Click the Run button to start Figure 6 75 Run Button...

Страница 157: ...r 2 In the System settings in cydwr file of the example project change the Debug Select to SWD and build the project See Figure 5 8 on page 53 3 Program the CY8CKIT 040_Proximity_UART example project...

Страница 158: ...NO LOAD CR2032 Coin Cell Battery Holder VDD V3 3 VBUS VIN V3 3 VBUS VDD VDD VIN J9 1 1 2 2 3 3 J11 2 PIN HDR 1 1 2 2 BT1 1 2 0603 C26 1 0 uF TP6 RED SOD123 D11 SOD123 D3 U1 NCP1117DTARKG ADJ 1 VOUT 2...

Страница 159: ...5 VCCD 6 VDD 7 VSS 8 P0 5 9 P0 6 10 P0 7 11 P1 0 12 P1 1 13 P1 2 14 P1 3 15 P1 4 16 P1 5 17 P1 6 18 P1 7 19 P2 0 20 P3 0 21 P3 1 22 P3 2 23 XRES 24 epad 25 0603 C3 1 0 uF 0402 C30 0 1 uF 0603 R51 ZERO...

Страница 160: ..._1 P1_7 P1_3 P1_2 XRES V3 3_EXT IOREF P3_1 P1_7 XRES P1_1 P1_3 P0_4 P0_2 P0_1 P0_0 P2_0 P1_2 P2_0 P1_0 P3_1 P4_VDD VBUS P4_VDD VIN 0603 R54 ZERO 0603 R9 2 2K J12 3x2 RECPT 1 2 3 4 5 6 J5 1x1 RECP J1 8...

Страница 161: ...G P5LP_VDD P5LP_VDD VDD R38 30K R37 15K R21 10K 0402 C20 0 1 uF 0603 C19 1 0 uF R20 10K 0402 C12 0 1 uF 0603 C11 1 0 uF 0402 C14 0 1 uF 0402 C17 0 1 uF 0603 R27 22E 0402 C21 0 1 uF 0805 R5 ZERO 0402 C...

Страница 162: ...0 1 uF 0603 R18 ZERO 0603 R15 ZERO 0603 R17 ZERO 0603 R14 ZERO 0603 R16 ZERO J1 J4 Arduino Compatible Headers CapSense Touch Pad P1_4 P1_5 P1_6 P1_0 P1_7 P0_1 P0_0 P0_5 P0_6 P0_7 P0_3 XRES V3 3 IOREF...

Страница 163: ..._06 RESET NC J1_07 IOREF P4_VDD NC J1_08 NC NC J2 Connector Pin Baseboard Signal Trackpad Shield Signal J2_01 A0 P0 0 TRACK_COLUMN1 J2_02 A1 P0 1 TRACK_COLUMN0 J2_03 A2 P0 2 TCPWM_LINE Blue LED CTANK...

Страница 164: ...RACK_COLUMN2 J4_02 D1 P0 6 TRACK_COLUMN3 J4_03 D2 P0 7 TRACK_COLUMN4 J4_04 D3 P3 2 TCPWM_LINE Red LED NC J4_05 D4 P0 3 TRACK_COLUMN5 J4_06 D5 P3 0 SWDIO NC J4_07 D6 P1 0 TRACK_ROW3 J4_08 D7 P2 0 PROX...

Страница 165: ...gma ADC input J8_05 P3 4 SAR input J8_06 P3 5 SAR input J8_07 P3 6 Buffered VDAC J8_08 P3 7 Buffered VDAC J8_09 P12 6 UART RX J8_10 P12 7 UART TX J8_11 GND GND J8_12 P3 0 IDAC output J6 Pin PSoC 5LP S...

Страница 166: ...nter face R30 Unsolder R30 which connects P0 2 to the blue LED to enable shield tank capacitor C5 on P0 2 PSoC 4 R4 R6 Unsolder R4 to remove supply to VTARG and solder zero ohm resistors R6 to supply...

Страница 167: ...Host tool shipped with PSoC Creator 3 LED blinks very fast Frequency 15 0 Hz SWD operation is in progress Any I2C traffic Kit s COM port connect discon nect event one blink In PSoC Programmer watch th...

Страница 168: ...airchild Semiconduc tor MBR0520L 10 1 LED1 Power LED Amber LED 595NM AMB DIFF 0805 SMD Avago Technologies HSMA C170 11 1 D5 2V Zener DIODE ZENER 2V 500MW SOD123 Diodes Inc BZT52C2V0 7 F 12 3 D6 D7 D8...

Страница 169: ...0 30K RES 30K OHM 1 10W 5 0603 SMD Panasonic ECG ERJ 3GEYJ303V 39 1 R42 1K RES 1K OHM 1 8W 5 0805 SMD Panasonic ECG ERJ 6GEYJ102V 40 1 R43 442 ohm RES 442 OHM 1 10W 1 0603 SMD Panasonic ECG ERJ 3EKF44...

Страница 170: ...k Screen in the Corners 61 4 N A N A BUMPON CYLINDRICAL 312X 215 BLACK 3M SJ61A6 Special Jumper Installation Instructions 62 1 J9 Install jumper across pins 1 and 2 Rectangular Connectors MINI JUMPER...

Страница 171: ...Trackpad Touchpad Sticker Details A 8 Regulatory Compliance Information The CY8CKIT 040 PSoC 4000 Pioneer Kit has been tested and verified to comply with the following electromagnetic compatibility EM...

Страница 172: ...lists the pin maps of the Pioneer series kits to allow for easy migration of projects across different kits In some cases the pins available on the Pioneer kit headers are a superset of the standard A...

Страница 173: ...VDD P4 VDD 8 NC NC NC NC NC J2 Arduino Compatible Header Pin Map Pin Arduino Pin Pioneer Series Kits CY8CKIT 042 CY8CKIT 040 CY8CKIT 042 BLE CY8CKIT 044 1 A0 P2 0 P0 0 P3 0 P2 0 2 P0 2 P2 0 P2 6 3 A1...

Страница 174: ...10 SCL P4 0 P1 2 P3 5 P4 0 These pins are also used for onboard peripherals See the tables in the Onboard Peripherals on page 175 section below for connection details J4 Arduino Compatible Header Pin...

Страница 175: ...5 CSS5 P1 5 P2 5 P3 5 6 CMOD P4 2 P0 4 P4 0 P4 2 7 CTANK P4 3 P0 2 P4 1 P4 3 Proximity Header Pin Map Pin Description Pioneer Series Kits CY8CKIT 042 CY8CKIT 040 CY8CKIT 042 BLE CY8CKIT 044 1 PROXIMIT...

Страница 176: ...dated Figure Example Projects Updated description Updated Figure Starter Designs Updated Application Notes on page 12 Updated description Updated Software Installation chapter on page 15 Updated Insta...

Страница 177: ...ated Project Description on page 76 Updated PSoC Creator Component Configuration on page 76 Updated Figure 5 29 Updated Hardware Connections on page 78 Updated Figure 5 32 Updated Verify Output on pag...

Страница 178: ...Updated Figure 6 27 Updated Developing Applications for PSoC 5LP on page 130 Updated Building a Bootloadable Project for PSoC 5LP on page 131 Updated description Updated Figure 6 42 Updated Figure 6 4...

Страница 179: ...Using FM24W256 F RAM on page 113 Updated Example Firmware on page 115 Updated Figure 6 17 Updated Figure 6 18 Updated Using PSoC 5LP as a USB UART Bridge on page 118 Updated Figure 6 25 Updated Figur...

Страница 180: ...n chapter on page 7 Updated Additional Learning Resources on page 13 Updated hyperlinks for Datasheets Development Kits and Knowledge Base Article KBA Updated Software Installation chapter on page 15...

Страница 181: ...n page 131 Updated description Updated Figure 6 42 Updated Building a Normal Project for PSoC 5LP on page 139 Updated description Updated Figure 6 53 Updated PSoC 5LP Factory Program Restore Instructi...

Отзывы: