Cypress CY8CKIT-001 Manual

Cypress CY8CKIT-001 Manual

Psoc development kit
Hide thumbs Also See for CY8CKIT-001:
Table of Contents

Advertisement

Quick Links

CY8CKIT-001
®
PSoC
Development Kit Guide
Doc. # 001-48651 Rev. *J
May 3, 2012
Cypress Semiconductor
198 Champion Court
San Jose, CA 95134-1709
Phone (USA): 800.858.1810
Phone (Intnl): 408.943.2600
http://www.cypress.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CY8CKIT-001 and is the answer not in the manual?

Questions and answers

Summary of Contents for Cypress CY8CKIT-001

  • Page 1 CY8CKIT-001 ® PSoC Development Kit Guide Doc. # 001-48651 Rev. *J May 3, 2012 Cypress Semiconductor 198 Champion Court San Jose, CA 95134-1709 Phone (USA): 800.858.1810 Phone (Intnl): 408.943.2600 http://www.cypress.com...
  • Page 2 Cypress Source Code and derivative works for the sole purpose of creating custom soft- ware and or firmware in support of licensee product to be used only in conjunction with a Cypress integrated circuit as speci- fied in the applicable agreement.
  • Page 3: Table Of Contents

    2.4.1 Loading my First PSoC 5 Project ..............28 2.4.2 Building My First PSoC 5 Project ..............30 2.4.3 Programming My First PSoC 5 Project ............31 2.4.4 Running My First PSoC 5 Project ..............32 CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 4 Appendix B. MiniProg3 MiniProg3 LEDs.......................203 Programming in Power Cycle Mode ................203 Interface Pin Assignment Table................203 Protection Circuitry ....................204 Level Translation .....................204 Appendix C. MiniProg3 Technical Description Interfaces.........................206 C.1.1 ISSP......................206 C.1.2 JTAG......................206 CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 5 Contents C.1.3 SWD/SWV....................206 C.1.4 I2C™ ......................206 Connectors ......................207 C.2.1 5-Pin Connector ...................207 C.2.2 10-Pin Connector ..................207 Power........................209 CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 6 Contents CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 7: Introduction

    Kit release notes ❐ Software release notes ❐ Code example files, firmware, and documentation ❐ 1. Any USB certified cable up to 2 meters in length can be used with the DVK. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 8: Installation

    1.3.1 Before You Begin All Cypress software installations require administrator privileges, but this is not required to run the installed software. Shut down any currently running Cypress software. Disconnect any ICE-Cube or MiniProg devices from your computer.
  • Page 9: Installing Psoc 5 Development Software

    Warp Verilog Reference Guide (warp_verilog_reference.pdf) ■ Customization API Reference (customizer_api.chm) ■ Note After the installation is complete, the kit contents are available at the following location: <Install_Directory>:\PSoC Development Kit CY8C55\<version> CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 10: Psoc Development Board

    1.4.1 Default Switch and Jumper Settings Jumpers on the CY8CKIT-001 PSoC development board have a default setting to operate at 3.3 V. For default configuration, each of the jumpers must be set according to these instructions. Note All CY8C28 and CY8C29 family processor module code examples are configured for 5 V. Con- figure the board to 5 V, before creating the code examples.
  • Page 11 J2-J5 - VDDIO Power Select. Default Position: VDD (upper left two pins) J10 - RS-232 Power (Serial Communications). Default Position: Installed J14 - Radio Power. Default Position: Installed J11 - Variable Resistor Power. Default Position: Installed CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 12: Kit Revision

    CD ISO image at http://www.cypress.com/go/CY8CKIT-001. To upgrade CY8CKIT-001 to CY8CKIT-001B, besides the upgrades stated above, you need to pur- chase the latest PSoC 5 process module at http://www.cypress.com/go/CY8CKIT-010. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 13: Additional Resources

    Click the Debugger icon, and then click Next. Note Displays functionality unique to PSoC Designer, PSoC Creator, or the PSoC device. WARNING: Displays cautions that are important to the subject. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 14: Document Revision History

    01/13/12 RKAD to note in section A.1.4 - LCD Module Minor ECN to include attachments in pdf. No content updates 01/18/12 RKAD made. 05/03/12 SASH Added the Additional Resources section CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 15: Loading My First Psoc Project

    Loading My First PSoC Project The CY8CKIT-001 PSoC Development Kit supports projects across the PSoC 1, PSoC 3, and PSoC 5 architectures. This section walks you through the high-level design process for opening, building, programming, and running your first PSoC project using this kit.
  • Page 16: My First Psoc 1 (Cy8C28) Project

    4. Open the folder Ex1_LED_with_PWM. 5. Double-click Ex1_LED_with_PWM.app. 6. The project opens in the Chip Editor view. All project files are in the Workspace Explorer. Figure 2-1. Chip Editor View CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 17: Building My First Psoc 1 Project

    5. In PSoC Programmer, set AutoDetection to On to enable the software to automatically detect and configure for the target device family and device. If PSoC Programmer is properly configured, AutoDetection reports a device family of 28xxx. Note Make sure ISSP protocol is selected. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 18: Running My First Psoc 1 Project

    PWM and software. Now that the PSoC 1 device is programmed, reset the PSoC development board by pressing and releasing the reset switch (SW4). 2. LED1 blinks approximately once every second and LED2 blinks about three times a second. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 19 Figure 2-5. Connect P1[6] to LED1 and P1[7] to LED2 P1[6] P1[7] LED1 LED2 3. For more details regarding this project, see the detailed project instructions in My First PSoC 1 (CY8C28) Project on page CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 20: My First Psoc 1 (Cy8C29) Project

    4. Open the folder Example_My_First_PSoC_Project. 5. Double-click Example_My_First_PSoC_Project.app. 6. The project opens in the Chip Editor view. All project files are in the Workspace Explorer. Figure 2-6. Chip Editor View CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 21: Building My First Psoc 1 Project

    2. PSoC Designer builds the project and displays comments in the Output window. When you see the message that the project is built with 0 errors and 0 warnings, you are ready to program the device. Figure 2-8. Output Window CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 22: Programming My First Psoc 1 Project

    Debugger from the tree. Make sure that External only is selected under the Pod Power Source section and select Execute Program from the Debug menu to start debugging. Connect the processor module to the CY3215-DK ICE-Cube, as shown in Figure 2-10. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 23: Running My First Psoc 1 Project

    PWM and software. Now that the PSoC 1 device is programmed, reset the PSoC development board by pressing and releasing the reset switch (SW4). 2. LED1 blinks approximately once every second and LED2 blinks about three times a second. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 24 Figure 2-11. Connect P0[7] to LED1 and P1[7] to LED2 P0[7] P1[7] LED1 LED2 3. For more details regarding this project, see the detailed project instructions in My First PSoC 1 (CY8C29) Project on page CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 25: My First Psoc 3 (Cy8C38) Project

    Figure 2-12. Kits List 5. Select the directory to store the project. 6. After the project opens, you can see the project files in Workspace Explorer (see Figure 2-13). Figure 2-13. Workspace Explorer CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 26: Building My First Psoc 3 Project

    2. PSoC Creator builds the project and displays the comments in the Output window. When you see the message "Build Succeeded", you are ready to program the device. Figure 2-15. Output Window CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 27: Programming My First Psoc 3 Project

    2. In PSoC Creator, from the Debug menu, click Program. 3. The PSoC Creator status bar indicates that the device is programming. 4. Wait until programming is complete before continuing. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 28: Running My First Psoc 3 Project

    1. Open PSoC Creator. 2. In the Start Page, under Start Page Topics expand Kits. 3. Under Kits, expand PSoC CY8C55 Family Processor Module Kit. 4. Click Ex1_LED_with_PWM.cywrk to open the project. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 29 Figure 2-18. Kits List 5. Select the directory to store the project. 6. After the project opens, you can see the project files in Workspace Explorer. Figure 2-19. Workspace Explorer CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 30: Building My First Psoc 5 Project

    2. PSoC Creator builds the project and displays the comments in the Output window. When you see the message "Build Succeeded", you are ready to program the device. Figure 2-21. Output Window CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 31: Programming My First Psoc 5 Project

    2. In PSoC Creator, from the Debug menu, click Program. 3. The PSoC Creator status bar indicates that the device is programming. 4. Wait until programming is complete before continuing. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 32: Running My First Psoc 5 Project

    3. LED1 blinks approximately once every second and LED 2 blinks about three times a second. Figure 2-23. Connect P1[6] to LED1 and P1[7] to LED2 P1[6] P1[7] LED1 LED2 CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 33: Sample Projects

    3. In the New Project window, select Chip-Level Project. Name the project Ex1_LED_with_PWM. 4. In the Location field, click Browse and navigate to the appropriate directory. Figure 3-1. New Project Window 5. Click OK. The Select Project Type window opens. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 34 8. In this section, click the CY8C28645-24LTXI device; click Select. Figure 3-3. Device Catalog Window 9. Under Generate 'Main' File Using:, select C; then, click OK. 10.By default, the project opens in Chip view. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 35 11. In the User Modules window, expand the PWMs folder. Figure 3-5. User Modules Window 12.In this folder, right-click on PWM8 and select Place. The user module (UM) is placed in the first available digital block. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 36  appear, click View Properties Window. Figure 3-7. Properties Window 14.Next, route the PWM CompareOut signal to P1[7]. The first step is to configure the lookup table (LUT) on Row_0_Output3. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 37 15.Double-click the LUT, the Digital Interconnect window opens. 16.In this window, enable Row_0_Output_3_Drive_3 to connect to GlobalOutOdd_7. Figure 3-9. Digital Interconnect Window 17.Click Close. 18.Click on GlobalOutOdd_7. In the window that appears, configure Pin for Port_1_7. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 38 Figure 3-11. Workspace Explorer 21.Click the LED_1 UM and navigate to the Properties window. Configure the LED for P1[6]. Figure 3-12. Properties Window 22.Configure the Global Resources window to match the following figure. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 39 30.Use PSoC Designer as described in Programming My First PSoC 1 Project on page 17 program the device. 31.Reset the DVK and observe the blinking LEDs. 32.Save and close the project. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 40 /* Switch the state of Software LED (on or off) */ LED_1_Invert(); } /* End of while(1) */ } /* End of main */ /* [] END OF FILE */ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 41: Adc To Lcd Project

    4. Verify that the DelSigPlus_1 UM is placed in ASC10. 5. In the User Modules window, expand the Amplifiers window. Right-click PGA and select Place. Ensure that the PGA is placed in ACC00. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 42 7. Click PGA_1 and configure the properties to match this figure. Figure 3-17. PGA_1 Properties 8. Click DelSigPlus_1 and configure the properties to match this figure. Figure 3-18. DelSigPlus_1 Properties CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 43 10.Configure the Global Resources to match the following figure. Figure 3-20. Global Resources 11. Ensure that AnalogColumn_InputMUX_0 is connected to Port_0_1. If it is not configured for this port, double-click the mux and choose Port_0_1. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 44 Sample Projects Figure 3-21. AnalogColumn_InputMUX_0 Connected to Port_0_1 12.Ensure that AnalogColumn_Clock_0 is connected to VC1. If it is not, double-click the mux and choose VC1. Figure 3-22. AnalogColumn_Clock_0 Connected to VC1 CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 45 Programming My First PSoC 1 Project on page 17 program the device. 21.After programming the device, press the reset button and vary the potentiometer (R20) to see the results on the LCD. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 46 DelSigPlus_1_StartAD(); /* Start gathering conversions from the ADC */ M8C_EnableGInt; /* Enable Global interrupts */ /* This loop waits for a valid ADC result, and displays it on the LCD */ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 47 LCD_1_Position(ROW_0, COLUMN_9); /* Set LCD to (Row=0,Column=9) */ LCD_1_PrHexInt(adcResult); /* Print ADC result on LCD */ } /* End of while(1) */ } /* End of main */ /* [] END OF FILE */ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 48: Adc To Uart With Dac

    9. In the User Modules window, expand DACs, right-click DAC6, and select Place. User module is placed in ASD20 analog block by default. Drag and drop it to ASC21 block. 10.Move the UMs so that they match the configuration shown in Figure 3-25. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 49 Sample Projects Figure 3-25. Configure User Modules TX8_1 Counter16_1 Counter16_1 PGA_1 DelSigPlus_1 DAC6_1 11. Click on DelSigPlus_1 and configure it to match this figure. Figure 3-26. DelSigPlus_1 Properties CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 50 Figure 3-28. DAC6_1 Properties 14.Click LCD_1 and configure it to match this figure. Figure 3-29. LCD_1 Properties 15.Click on Counter16_1 and configure it to match this figure. Figure 3-30. Counter16_1 Properties CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 51 Sample Projects 16.Click TX8_1 and configure it to match this figure. Figure 3-31. TX8_1 Properties 17.Click RO0[2] LUT, enable Row_0_Output_2_Drive_2 to connect GlobalOutOdd_2. Figure 3-32. Digital Interconnect Window CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 52 20.Click AnalogOutBuf_1 and configure it for Port_0_5. Figure 3-34. Configure AnalogOutBuf_1 21.Verify that AnalogColumn_InputMUX_0 is connected to Port_0_1. If it is not configured for this port, double-click the mux and choose Port_0_1. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 53 Sample Projects Figure 3-35. AnalogColumn_InputMUX_0 Connection CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 54 Sample Projects 22.Verify that AnalogColumn_Clock_0 and AnalogColumn_Clock_1 are connected to VC2. If it is not, double-click the mux and chose VC2. Figure 3-36. AnalogColumn_Clock_0 Connection CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 55 ❐ Note An LED (P0[5] to LED1) by nature does not accurately show the changes in frequency the best way to see this is to use a Scope(P0[5] to Scope). CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 56 Note The ADC output values may not reach full range due to potentiometer and ADC limitations. ADC values may fluctuate several counts due to system noise, and if the potentiometer voltage is at the edge of an ADC count. 40.Save and close the project. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 57 /* Variable for holding ADC result, and updating counter period */ WORD adcResult; Counter16_1_Start(); /* Enable the counter used for DAC update rate */ Counter16_1_EnableInt(); /* Enable DAC update interrupt */ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 58 The related #pragma above is necessary for the boot.asm file to jump to it. Every time a terminal count is reached the DAC will get the next value from the sinTable. * Parameters: void * Return: void CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 59 Counter16_C_ISR(void) @ 0x24 #else void Counter16_C_ISR(void) #endif // Check to see if we have reached the // if (tablePos >= sizeof(sinTable)) tablePos = 0; DAC6_1_WriteBlind(sinTable[tablePos++]); /* [] END OF FILE */ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 60: Capsense

    Figure 3-39. Select Multi User Module Window 3. Select Yes and click OK. 4. Right-click the CSD user module in the workspace explorer and select CSD Wizard. Figure 3-40. Select CSD Wizard CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 61 6. In the CapSense Wizard window, under the Global Settings tab, set the # of buttons to ‘2’. 7. Select P0[7] as the Modulator Capacitor Pin. Figure 3-42. CapSense Wizard Place Buttons CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 62 S0[0] to P0[0] ❐ ❐ S0[1] to P0[1] S0[2] to P0[2] ❐ S0[3] to P0[3] ❐ S0[4] to P0[4] ❐ 11. Select the Sensors Settings tab. 12.Set the Resolution to 80. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 63 16.In the User Modules window, expand Misc Digital, right-click LED, and select Place. 17.Click CSD_1 and configure it to match this figure. Figure 3-45. CSD_1 Properties 18. Click LCD_1 and configure it to match this figure. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 64 CY8C28_main_Ex4.c file, which is available within the attachments feature of this PDF document. 23.Save the project.  24.To generate and build the project, click Build Generate/Build 'Ex4_CapSense' Project. 25.Disconnect power to the board. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 65 "Button2" in the top row of the LCD display. The bottom row of the LCD dis- plays the slider position with a horizontal bargraph. 32.Save and close the project. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 66 CapSense sensors (slider sensors and buttons), gets the state of the buttons and slider and updates the LCD with the current state. * Parameters: void * Return: void *******************************************************************************/ void main(void) CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 67 Updates the LCD screen with the current button state by displaying which button is being touched on row 0. LED's are also updated according to button state. * Parameters: sensor_1: Button state for B1 sensor_2: Button state for B2 * Return: CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 68 * Function Name: UpdateSliderPosition ******************************************************************************** * Summary: Updates the LCD screen with the current slider position by displaying the horizontal bargraph. * Parameters: value: Centroid position from CapSense slider. * Return: void CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 69 /* Clear old slider position (2nd row of LCD) */ LCD_1_Position(ROW_1, COLUMN_0); LCD_1_PrCString(DEFAULT_ROW_1_STR); else /* Update the bargraph with the current finger position */ LCD_1_DrawBG(ROW_1, COLUMN_0, NUM_CHARACTERS, value + 1); /* [] END OF FILE */ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 70: Cy8C29 Family Processor Module Code Examples

    3. In the New Project window, select the Chip-Level Project. Name the project Example_My_First_PSoC_Project. 4. In the Location field, click Browse and navigate to the appropriate directory. Figure 3-50. New Project Window 5. Click OK. The Select Project Type window opens. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 71 8. For this project, click any device in this section and then click Select. Figure 3-52. Device Catalog Window 9. Under Generate 'Main' File Using:, select C, then click OK. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 72 11. In the User Modules window, expand the PWMs folder. Figure 3-54. User Modules Window 12.In this folder, right-click on PWM8 and select Place. The User Module (UM) is placed in the first available digital block. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 73 13.Double-click the placed PWM8_1 UM; the Properties window opens on the left side of the screen. Configure the PWM with the settings as in the following figure. If the Properties window  does not appear, click View Properties Window. Figure 3-56. Properties Window CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 74 15.Double-click the LUT, the Digital Interconnect window opens. 16.In this window, enable Row_0_Output_3_Drive_1 to connect to GlobalOutEven_7. Figure 3-58. Digital Interconnect Window 17.Click Close. 18.Click on GlobalOutEven_7. In the window that appears, configure Pin for Port_0_7. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 75 Loadable Configurations example_my_first_psoc_project - 2 User Modules. Figure 3-60. Workspace Explorer 21.Double-click the LED_1 UM and navigate to the Properties window. Configure the LED for Port_1_7. Figure 3-61. Properties Window CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 76 30.Use PSoC Designer as described in Programming My First PSoC 1 Project on page 22 to pro- gram the device. 31.Reset the DVK, and observe the blinking LEDs. 32.Save and close the project. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 77 //Length of delay depends on compiler and CPU clock LED_1_Invert(); //Switch the state of Software LED, if on turn it off, //if off turn it on } //End of while(1) }//End of main CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 78: Adc To Lcd Project

    4. Verify that the DelSig_1 UM is placed in ASC10. 5. In the User Modules window, expand the Amplifiers window. Right-click PGA and select Place. Ensure that the PGA is placed in ACB00. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 79 Figure 3-66. PGA_1 Properties 8. Double-click DelSig_1 and configure the properties to match this figure. Figure 3-67. DelSig_1 Properties 9. Double-click LCD_1 and configure the properties to match this figure. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 80 10.Configure the Global Resources to match the following figure. Figure 3-69. Global Resources Properties 11. Ensure that AnalogColumn_InputMUX_0 is connected to Port_0_1. If it is not configured for this port, double-click the mux and choose Port_0_1. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 81 CY8C29_main_Ex2.c file, which is available within the attachments feature of this PDF document. 14.Save the project.  15.To build the project, click Build Generate/Build 'Example_ADC_to_LCD' Project. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 82 Note The ADC output values may not reach full range due to potentiometer and ADC limitations. ADC values may fluctuate several counts due to system noise, and if the potentiometer voltage is at the edge of an ADC count. 22.Save and close the project. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 83 *******************************************************************************/ #include <m8c.h> // part specific constants and macros #include "PSoCAPI.h" // PSoC API definitions for all User Modules unsigned int wADCResult; // Holds the integer ADC result void main(void) CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 84 //This loop waits for a valid ADC result, and then displays it on the LCD while (1) while (!(DelSig_1_fIsDataAvailable()));//Wait for ADC data to be ready wADCResult=DelSig_1_wGetDataClearFlag();//Store result from ADC LCD_1_Position(0,9); //Set LCD to (Row=0,Column=9) LCD_1_PrHexInt(wADCResult);//Print ADC result on LCD CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 85: Adc To Lcd With Dac And Uart

    DelSig UM. Scroll down, if necessary, and select the DS232 configuration. Click OK. Figure 3-73. Select Multi User Module Window 3. Click OK. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 86 8. In the User Modules window, expand Digital Comm, right-click TX8, and select Place. 9. In the User Modules window, expand DACs, right-click DAC6, and select Place. 10.Move the UMs so that they match the configuration shown in Figure 3-75 on page CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 87 Sample Projects Figure 3-75. Configure User Modules Counter8_1 Counter8_2 TX8_1 PGA_1 DelSig_1 DAC6_1 CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 88 Figure 3-77. PGA_1 Properties 13.Double-click DAC6_1 and configure it to match this figure. Figure 3-78. DAC6_1 Properties 14.Double-click LCD_1 and configure it to match this figure. Figure 3-79. LCD_1 Properties CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 89 Figure 3-80. Counter8_1 Properties 16.Double-click Counter8_2 and configure it to match this figure. Figure 3-81. Counter8_2 Properties 17.Double-click TX8_1 and configure it to match this figure. Figure 3-82. TX8_1 Properties CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 90 Sample Projects 18.Double-click RO2[0] LUT, enable Row_2_Output_0_Drive_1 to connect GlobalOutEven_4. Figure 3-83. Digital Interconnect Window CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 91 Sample Projects 19.Double-click GlobalOutEven_4. In the window that appears, configure Pin for Port_0_4. Figure 3-84. Configure Pin for Port_0_4 20.Click OK to continue. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 92 21.Click AnalogOutBuf_1 and configure it for Port_0_5. Figure 3-85. Configure AnalogOutBuf_1 22.Verify that AnalogColumn_InputMUX_0 is connected to Port_0_1. If it is not configured for this port, double-click the mux and choose Port_0_1. Figure 3-86. AnalogColumn_InputMUX_0 Connection CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 93 Sample Projects 23.Verify that AnalogColumn_Clock_0 is connected to VC2. If it is not, double-click the mux and chose VC2. Figure 3-87. AnalogColumn_Clock_0 Connection CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 94 ❐ Note An LED (P0[5] to LED1) by nature does not accurately show the changes in frequency; the best way to see this is to use a Scope(P0[5] to Scope). CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 95 Note The ADC output values may not reach full range due to potentiometer and ADC limitations. ADC values may fluctuate several counts due to system noise, and if the potentiometer voltage is at the edge of an ADC count. 39.Save and close the project. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 96 = None PulseWidth = N/A *Note this parameter is not used *******************************************************************************/ /****************************************************************************** Counter8_1 Settings: The Counter8_1 controls the update rate of the DAC. The DAC is updated during ever CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 97 UM's input clock by 8. Clock = Row_2_Output_1 (From Counter8_1) Output = Row_2_Output_0 Tx Interrupt Mode = TXComplete ClockSync = Sync to SysClk Data Clock Out = None *******************************************************************************/ /****************************************************************************** DAC6 Settings: CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 98 (DelSig_1_fIsDataAvailable())//Is new data available from the ADC? bADCvalue = DelSig_1_bGetDataClearFlag(); // Get new data from ADC Counter8_1_WritePeriod(bADCvalue); // Update DAC update rate counter LCD_1_Position(0,0); // Move LCD (row=0,column=0) LCD_1_PrHexByte(bADCvalue); // Print ADC result to LCD CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 99 Sample Projects TX8_1_PutSHexByte(bADCvalue); // Write LCD result out TX8 to PC TX8_1_PutCRLF(); // Send a return character } //end of while(1) //End of Main CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 100 ; Insert your custom declarations below this banner ;--------------------------------------------------- export bTablePos// Stores last table position index export _bTablePos ;------------------------ ; Includes ;------------------------ ;------------------------ Constant Definitions ;------------------------ ;------------------------ ; Variable Allocation ;------------------------ area bss(RAM) bTablePos:blk 1 _bTablePos: CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 101 DAC6_1_WriteBlind;Write value from SINtable (stored in A) to the DAC pop X pop A ;--------------------------------------------------- ; Insert your custom code above this banner ;--------------------------------------------------- ;@PSoC_UserCode_END@ (Do not change this line.) reti ; end of file Counter8_1INT.asm CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 102: Cy8C38 / Cy8C55 Family Processor Module Code Examples

    Figure 3-90. New Project Window 5. By default, the design window opens TopDesign.cysch. This is the project's schematic entry file within PSoC Creator. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 103 CMP Value 1: 50 CMP Value Type 1: Less or Equal ❐ Figure 3-92. PWM Component Configuration Advanced Tab Enable Mode: Hardware Only ❐ Interrupt On Terminal Count Event: Select ❐ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 104 Select Digital Output check box ❐ Select HW Connection check box ❐ Figure 3-94. LED1 Component Configuration General Tab Drive Mode: Strong Drive ❐ Leave the remaining parameters as default ❐ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 105 2. Double-click the Pin_1 component in the schematic to open the configuration window. 3. Configure the digital output pin: Type Tab Name: LED2 ❐ Figure 3-96. LED2 Component Configuration General Tab CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 106 6. Configure the clock: Configure Clock Tab Name: Clock_1 ❐ ❐ Source: ILO (1.000 kHz) Select Divider and set the value as 10 ❐ Leave the remaining parameters as default ❐ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 107 Configuring Pins 1. From the Workspace Explorer, double-click the Ex1_LED_with_PWM.cydwr file (see Figure 3-100). 2. Click the Pins tab. 3. Select pin P1[6] for LED1. 4. Select pin P1[7] for LED2. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 108 * Parameters: void * Return: void *******************************************************************************/ void main(void) uint8 ledState = 0x00; /* Initially set LED2 to off */ Clock_1_Enable(); /* Start the clock */ PWM_1_Start(); /* Enable PWM CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 109 3. From the Build menu, select Build Ex1_LED_with_PWM. 4. PSoC Creator builds the project and displays the comments in the Output dialog box. When you see the message "Build Succeeded", the build is complete. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 110 PWM causes the LED1 to blink at approximately 1 Hz due to PSoC Creator's PWM component and LED2 blinks at a faster rate using a software timing loop to toggle the LED. 7. Save and close the project. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 111: Adc To Lcd Project

    ❐ Buffer Gain: 1 ❐ ❐ Reference: Internal Vref Clock Source: Internal ❐ For more information about what the parameters mean, click the Datasheet button in the config- uration window. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 112 3. Configure the analog pin as follows: Type Tab ❐ Name: POT Select Analog check box only ❐ For more information about what the parameters mean, click the Datasheet button in the configuration window. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 113 2. Double-click the LCD_Char_1 component in the schematic to open the configuration window. 3. Configure the character LCD: Name: LCD_Char_1 ❐ LCD Custom Character Set: None ❐ Include ASCII to Number Conversion Routines: check box ❐ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 114 Figure 3-105. Connected Components 3.3.2.6 Configuring Pins 1. From the Workspace Explorer, double-click the Ex2_ADC_to_LCD.cydwr file. 2. Click the Pins tab. 3. Select pins P2[6:0] for LCD_Char_1. 4. Select pin P0[7] for POT. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 115 The main function initializes both the ADC and LCD, starts and waits for an ADC conversion, then it displays the raw counts to the LCD. * Parameters: void * Return: CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 116 The voltage raw counts being received from the ADC * Return: void *******************************************************************************/ void UpdateDisplay (uint16 voltageRawCount) /* Move the cursor to Row 0, Column 9 */ LCD_Char_1_Position(ROW_0,COLUMN_9); LCD_Char_1_PrintNumber(voltageRawCount); /* Print the result */ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 117 Note The ADC output values may not reach full range due to potentiometer and ADC limitations. ADC values may fluctuate several counts due to system noise, and if the potentiometer voltage is at the edge of an ADC count. 8. Save and close the project. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 118: Adc To Uart With Dac

    2. Double-click the ADC_DelSig_1 component in the schematic to open the configuration window. 3. Configure the Delta Sigma ADC as follows: Configure Tab Name: ADC_DelSig_1 ❐ Conversion Mode: Continuous ❐ # Configs: 1 ❐ ❐ Resolution: 8 Conversion Rate: 10000 ❐ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 119 Pin) 2. Double-click the Pin_1 component in the schematic to open the configuration window. 3. Configure the analog pin: Type Tab Name: POT ❐ ❐ Select Analog check box only CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 120 LCD Custom Character Set: None ❐ Include ASCII to Number Conversion Routines: check box ❐ For more information about what the parameters mean, click the Datasheet button in the config- uration window. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 121 ❐ VDAC_Speed: Slow Speed ❐ Value_mV: 1600 ❐ Value_8 bit hex: 64 ❐ For more information about what the parameters mean, click the Datasheet button in the config- uration window. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 122 3. Configure the Opamp: Basic Tab Name: Opamp_1 ❐ Mode: Follower ❐ Power: High Power ❐ For more information about what the parameters mean, click the Datasheet button in the config- uration window. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 123 Type Tab Name: LED ❐ Select Analog check box only ❐ Figure 3-112. LED Component Configuration General Tab ❐ Drive Mode: High Impedance Analog Leave the remaining parameters as default ❐ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 124 ❐ Bits per second: 9600 ❐ Leave the remaining parameters to default ❐ For more information about what the parameters mean, click the Datasheet button in the config- uration window. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 125 Type Tab Name: TX_OUT ❐ Select HW Connection check box ❐ Figure 3-115. TX_OUT Component Configuration General Tab Under Drive Mode: Strong Drive ❐ Leave the remaining parameters as default ❐ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 126 ❐ Hardware Request: Rising Edge ❐ Leave the remaining parameters to default ❐ For more information about what the parameters mean, click the Datasheet button in the config- uration window. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 127 Configure Clock Tab Name: Clock_1 ❐ Source: IMO (3.000 MHz) ❐ Desired Frequency: 3 MHz ❐ Leave the remaining parameters set to their default values ❐ Figure 3-118. Clock Component Configuration CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 128 PDF document. Notes To access the embedded attachments feature in the PDF, click on the paper clip icon located in ■ the lower left corner of the Adobe Reader application. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 129 In the main loop, it starts and waits for an ADC conversion, then it displays the ADC raw count to the LCD, transmits the raw count serially, and sets the DMA clock divider proportional to the raw count. * Parameters: CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 130 /* Copy address of voltageWave to address of DAC. Set the lower 16-bits of the source and destination addresses for this TD * PSoC 3 */ #if(CYDEV_CHIP_DIE_EXPECT == CYDEV_CHIP_DIE_LEOPARD) CyDmaTdSetAddress(myTd, (uint16)(voltageWave), (uint16)VDAC8_1_viDAC8__D); #endif /* PSoC 5 */ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 131 The following equation is necessary to make the adjusted clock frequency (with the updated divider) linear with the ADC output. Clock_1_Stop(); Clock_1_SetDivider((((uint32)voltageRawCount * 1000) / (261 - (uint32)voltageRawCount)) + 1000); Clock_1_Start(); /******************************************************************************* * Function Name: UpdateDisplay ******************************************************************************** CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 132 The voltage raw counts being received from the ADC * Return: void *******************************************************************************/ void TxHex (uint16 voltageRawCount) static char8 const hex[16] = "0123456789ABCDEF"; /* TX converted MSnibble */ UART_1_PutChar(hex[(voltageRawCount>>12)&0xF]); /* TX converted second nibble */ UART_1_PutChar(hex[(voltageRawCount>>8)&0xF]); CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 133 8. Install a terminal application such as TeraTerm or HyperTerminal with these setup parameters: Baud Rate: 9600 ❐ Data: 8-bit ❐ Parity: none ❐ Stop: 1-bit ❐ Flow Control: none ❐ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 134 Note ADC values may fluctuate several counts due to system noise, and if the potentiometer voltage is at the edge of an ADC count. 11. Save and close the project. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 135: Usb Hid

    (SW), and initializing USB for 3 V operation. The firmware, after allowing the HID device to enumerate, continuously checks for a button press to see if it needs to send the keyboard key sequences for the Cypress website. When you press the button, LED1 also toggles. 3.3.4.1 Creating USB HID Project 1.
  • Page 136 Sample Projects Figure 3-123. USB Template Figure 3-124. HID Descriptor Configuration 5. Select the String Descriptor tab. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 137 14.Select the Device Descriptor tab. 15.Select Device Descriptor 16.Set the Product ID to F11E. 17.Set the Manufacturing String to Cypress Semiconductor. 18.Set the Product String to PSoC Development Kit. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 138 Figure 3-126. Alternating Setting Configuration 19.Select Configuration Descriptor. 20.Set Device Power to Self Powered. 21.Set Max Power to 100 mA. Figure 3-127. Configuration Descriptor Configuration 22.Select Alternate Setting 0. 23.Set Class to HID. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 139 1. Drag and drop a Digital Input Pin component (Component Catalog Ports and Pins Digital Input Pin) 2. Configure as follows. Type Tab Name: Button ❐ Figure 3-129. SW Digital Input Pin Configuration General Tab CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 140 1. Drag and drop a Digital Output Pin component (Component Catalog Ports and Pins Dig- ital Output Pin) 2. Configure as follows: Type Tab Name: LED ❐ Figure 3-131. LED Component Configuration General Tab CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 141 4. Click the PLL Clock block and select IMO (48.000 MHz) for the Input. 5. Set Desired: to 48 MHz for the PLL clock 6. Enable the USB clock. 7. Set the ILO clock to 100 kHz CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 142 6. Set ILO at 100 KHz. 7. In the PLL block, set the desired frequency as 33 MHz. 8. For Master Clock, select PLL_OUT (33 MHz) as input with Divider as 1. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 143 Assign USBFS_dm to P15[7] ❐ Assign LED to P1[6] ❐ Assign Button to P1[5] ❐ Figure 3-135. Pin Assignments 3.3.4.8 Creating main.c File 1. Open the existing main.c file within Workspace Explorer. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 144 Then it continuously checks for USB plug-and-play and a button press to see if the keyboard data needs sent. * Parameters: void * Return: void *******************************************************************************/ void main() CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 145 (i = 0; i < sizeof(cypressWebsiteCharSequence); i++) SendKey(cypressWebsiteCharSequence[i]); else /* Continue on */ /******************************************************************************* * Function Name: ButtonEventDetected ******************************************************************************** * Summary: Check to see if the button is pressed. * Parameters: void * Return: CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 146 = key; /* Send key-down data, make */ GetAckLoadEp(keyboardData); /* Send USB keyboard data */ keyboardData[KEY_DATA_INDEX] = KEY_RELEASE; /* Send key-up data, break */ GetAckLoadEp(keyboardData); /* Send USB keyboard data */ /******************************************************************************* CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 147 Data array for the keyboard device endpoint * Return: void *******************************************************************************/ static void GetAckLoadEp(uint8 * keyboardData) /* Wait for ACK before loading data */ while(!USBFS_1_bGetEPAckState(KEYBOARD_ENDPOINT)); /* ACK has occurred, load the endpoint */ USBFS_1_LoadInEP(KEYBOARD_ENDPOINT, keyboardData, KEYBOARD_DATA_SIZE); CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 148 9. When button SW1 is pressed, the Windows Run window opens and the keyboard key sequence for the Cypress website is sent to open the Cypress website. When you press the button, LED1 also toggles. 10.Save and close the project.
  • Page 149: Capsense

    Set parameters as shown in the following figure ❐ Figure 3-136. CapSense Component Configuration 4. Select the Widget Config Tab. 5. Add two buttons by clicking on Add Button. Leave the button parameters as default. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 150 6. Select Linear Slider and click on Add Linear Slider. 7. Change API resolution parameter to 80. Figure 3-138. Slider Configuration 8. Select Tuner Helper tab and uncheck the Enable Tune Helper box. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 151 2. Double-click the LCD_Char_1 component. 3. Set the parameter LCD Custom Character Set to Horizontal Bargraph. 4. Select Include ASCII to Number Conversion Routines. 5. Click OK Figure 3-140. Horizontal Bargraph Configuration CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 152 Figure 3-141. LED Configuration General Tab Drive Mode: Strong Drive ❐ Leave the remaining parameters as default ❐ Figure 3-142. Pins - LED Configuration 3. Click OK. 4. Configure LED2 similar to LED1. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 153 LCD_Char_1 to P2[0] to P2[6] (Drag it to P2[0] and PSoC Creator assigns the pin correctly.) ❐ Figure 3-143. Pin Assignment for CY8C38 Family Processor Module Figure 3-144. Pin Assignment for CY8C55 Family Processor Module CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 154 The main function initializes CapSense and the LCD. Then it continuously scans all CapSense slots (slider slots and buttons), gets the state of the buttons and slider and updates the LCD with the current state. * Parameters: void CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 155 Updates the LCD screen with the current button state by displaying which button is being touched on row 0. LED's are also updated according to button state. * Parameters: slot_1: Button state for B1 slot_2: Button state for B2 * Return: CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 156 /******************************************************************************* * Function Name: UpdateSliderPosition ******************************************************************************** * Summary: Updates the LCD screen with the current slider position by displaying the horizontal bargraph. * Parameters: value: Centroid position from CapSense slider. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 157 “Button2” in the top row of the LCD display. The bottom row of the LCD dis- plays the slider position with a horizontal bargraph. 7. Save and close the project. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 158: Sar Adc (Psoc 5 Only)

    2. Double-click the ADC_SAR_1 component in the schematic to open the configuration window. 3. Configure the SAR ADC as follows: Configure Tab Name: ADC_SAR_1 ❐ ❐ Power: High Power Resolution: 12 ❐ Conversion Rate: 100000 ❐ Clock Frequency: 1800 ❐ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 159 Pin) 2. Double-click the Pin_1 component in the schematic to open the configuration window. 3. Configure the analog pin: Type Tab Name: POT ❐ Select Analog check box only ❐ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 160 LCD Custom Character Set: None ❐ Include ASCII to Number Conversion Routines: check box ❐ For more information about what the parameters mean, click the Datasheet button in the config- uration window. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 161 ❐ VDAC_Range: 0 - 4.080 V (16 mV/bit) ❐ VDAC_Speed: Slow Speed ❐ For more information about what the parameters mean, click the Datasheet button in the config- uration window. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 162 ❐ Mode: Follower ❐ Power: High Power ❐ For more information about what the parameters mean, click the Datasheet button in the config- uration window. Figure 3-149. Opamp Component Configuration CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 163 Drive Mode: High Impedance Analog ❐ Leave the remaining parameters as default ❐ For more information about what the parameters mean, click the Datasheet button in the config- uration window. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 164 ❐ Leave the remaining parameters to default ❐ For more information about what the parameters mean, click the Datasheet button in the config- uration window. Figure 3-152. UART Component Configuration CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 165 Leave the remaining parameters as default ❐ Figure 3-154. Pins - TX_OUT Component Configuration For more information about what the parameters mean, click the Datasheet button in the config- uration window. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 166 4. Configure the clock: Configure Clock Tab Name: Clock_1 ❐ Source: IMO (3.000 MHz) ❐ Desired Frequency: 3 MHz ❐ Leave the remaining parameters set to their default values ❐ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 167 8. Right-click the LED analog pin, select the Shape menu option and then Flip Horizontal. This allows the LED pin to line up with the Opamp output. 9. When complete, the schematic looks similar to Figure 3-157. Figure 3-157. Connected Components CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 168 * between 0x3D and 0x9F because these are the two points where the LED * is not visible and where the LED is saturated */ const uint8 voltageWave[] = 0x6D, 0x6F, 0x71, 0x73, 0x75, 0x77, 0x79, 0x7B, 0x7D, 0x7F, 0x81, 0x83, 0x85, CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 169 /* Move the LCD cursor to Row 0, Column 0 */ LCD_Char_1_Position(ROW_0, COLUMN_0); /* Print Label for the pot voltage raw count */ LCD_Char_1_PrintString("V Count: "); CyDmaTdSetConfiguration(myTd, sizeof(voltageWave), myTd, TD_INC_SRC_ADR ); /* Configure the TD */ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 170 Print voltage raw count result to the LCD. Clears some characters if necessary. The voltageRawCount parameter is also updated for use in other functions. * Parameters: voltageRawCount: Voltage raw count from ADC CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 171 UART_1_PutChar(hex[(voltageRawCount>>12)&0xF]); /* TX converted second nibble */ UART_1_PutChar(hex[(voltageRawCount>>8)&0xF]); /* TX converted third nibble */ UART_1_PutChar(hex[(voltageRawCount>>4)&0xF]); /* TX converted LSnibble */ UART_1_PutChar(hex[voltageRawCount&0xF]); UART_1_PutString("h\r"); /* h for hexadecimal and carriage return */ CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 172 Stop: 1-bit ❐ Flow Control: none ❐ Figure 3-159. HyperTerminal Settings 9. Use PSoC Creator as described in Programming My First PSoC 5 Project on page 31 to program the device. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 173 ADC displayed on the LCD and in the terminal application. LED1 is a sine wave output whose period is based on the ADC. Turning the potentiometer results in the LCD and observed terminal value change. 11. Save and close the project. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 174 Sample Projects CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 175: Appendix A. Board Specifications And Layout

    There are four sections of GPIO, which can be powered to 5 V, 3.3 V, or VADJ using four headers. It enables you to power the PSoC GPIOs at different voltages. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 176: A.1.2 Power Supply Configuration Examples

    Figure A-2. Setting a 3.3-V Supply from VREG MOVE VDD SELECT SWITCH TO 3.3 V SELECT VDD AS SOURCE FOR VDD ANLG SELECT VDD AS SOURCE FOR VDD DIG SELECT VREG AS SOURCE CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 177 SELECT VDD AS SOURCE FOR VDD ANLG SELECT VADJ AS SOURCE FOR VDD DIG SELECT VREG AS SOURCE This helps to separate the digital supply from the analog supply and VDD. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 178 3. Place the jumper on J6 header to select VDD as source for VDD ANLG. 4. Place the jumper on J7 header to select VDD as source for VDD DIG. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 179 USB 5 V rail (VBUS). A.1.2.10 VDD Select Switch This switch allows you to select either 5 V or 3.3 V. VDD feeds VDD DIG, VDD ANLG, and VDDIO. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 180 VADJ voltage between 1.6 V and 3.29 V when the VDD select switch is in the 3.3 V position. When the VDD select switch is in the 5 V position, turning this variable resistor swings the VADJ voltage between 1.7 V and 4.95 V. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 181: A.1.3 Prototyping Components

    I/O pin. J10-RS-232 POWER P15-DB9 SERIAL COMMUNICATION PORT J9-FULL SPEED USB PORT J14-RADIO POWER J11-VARIABLE RESISTOR POWER P17-WirelessUSB LP RADIO MODULE CONNECTOR R20-VARIABLE CAPSENSE SLIDER CAPSENSE BUTTONS RESISTOR CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 182 Note These I/O signals must not be greater than 3.3 V. Table A-2. Connector Pin Assignments - Wireless Radio Module Socket Pin Number V3_3 RD_RESET MOSI MISO CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 183: A.1.4 Lcd Module

    LCD back-light on. The current consumption of the LCD with backlight is around 70 mA; this should be considered when you budget the power supply of the design. You may use the backlight LCD from Lumex Inc (part number: LCM-S01602DSF/A). CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 184: A.1.5 Capsense Elements

    Each VDDIO header provides power to specific GPIOs and is selectable from VDD, 3.3 V, or VADJ. For details on which GPIOs are powered by which VDDIO header, see the datasheet for the PSoC device used with this board. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 185 Table A-4. Connector Pin Assignments - Processor Module Sockets Pin Number P1 (West) P2 (North) P3 (East) P4 (South) VDDD P7[7] V5_0 P6[1] P12[2] P6[0] P12[3] VBAT P6[3] P8[0] P6[2] P8[1] V3_3 P15[5] P4[0] CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 186 P12[5] P8[6] P7[2] P1[2] P12[4] P8[7] P7[3] P1[0] P9[6] P4[2] (Empty) P5[3] P9[7] P4[3] (Empty) P5[2] P6[5] P4[4] P7[0] P5[1] P6[4] P4[5] P7[1] P5[0] P6[7] P4[6] XRES P6[6] P4[7] P9[1] CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 187 Board Specifications and Layout Figure A-10. Mechanical Layout Details for Processor Module Connector CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 188: A.1.7 Expansion Ports

    P3[6] P9[6] P1[5] P6[5] P3[5] P9[5] P1[4] P6[4] P3[4] P9[4] P1[3] P6[3] P3[3] P9[3] P1[2] P6[2] P3[2] P9[2] P1[1] P6[1] P3[1] P9[1] P1[0] P6[0] P3[0] P9[0] RESRV3 RESRV8 RESRV11 RESRV14 CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 189 I/Os as well as ground and voltage pins. It can be used to join processor module I/Os port3, port4, and port5 with external I/Os through the use of daughter boards. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 190 I/Os as well as ground and voltage pins. It can be used to join processor module I/Os port7, port8, and port9 with external I/Os through the use of daughter boards. It is used for devices with a high I/O count. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 191: A.2 Schematics

    Board Specifications and Layout Schematics A.2.1 CY8CKIT-001 PSoC Development Board CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 192: A.2.2 Cy8C28 Family Processor Module

    Board Specifications and Layout A.2.2 CY8C28 Family Processor Module CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 193: A.2.3 Cy8C29 Family Processor Module

    Board Specifications and Layout A.2.3 CY8C29 Family Processor Module CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 194: A.2.4 Cy8C38 Family Processor Module

    Board Specifications and Layout A.2.4 CY8C38 Family Processor Module CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 195: A.2.5 Cy8C55 Family Processor Module

    Board Specifications and Layout A.2.5 CY8C55 Family Processor Module CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 196: A.2.6 Enabling Boost Component In Psoc 3 And Psoc 5 Processor Modules

    AMP Division of TYCO 5747844-4 CONN RECEPT 4POS .100 VERT GOLD 929850-01-04-RA CONN RECEPT 12POS 2mm SMD TIN Hirose Electric Co. LTD. DF11Z-12DS-2V(20) CONN REC .100 14POS for LCM- 929850-01-14-RA S01602DSR/A CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 197 LCM-S01602DSR/A installed BUMPER WHITE .500X.23 SQUARE Richco Plastics Co. RBS-3R SHUNT GOLD W/HANDLE, BLACK Kobiconn 151-8030-E No Load Components R27,R49 RES NO LOAD 0603 SMD RES NO LOAD 0805 SMD CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 198: A.3.2 Cy8C28 Family Processor Module

    RECP VERT 20POS HIROSE Hirose DF12-5.0-20DP-0.5V-81 R1,R3,R5,R RES 56 OHM 1/10W 5% 0603 SMD Panasonic - ECG ERJ-3GEYJ560V R2,R4,R6,R RES 1.0K OHM 1/16W 5% 0603 SMD Panasonic - ECG ERJ-3GEYJ102V 8,R11 CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 199: A.3.4 Cy8C38 Family Processor Module

    6,R38,R39,R 40,R41,R42 TP1,TP3,TP TEST POINT 43 HOLE 65 PLATED RED Keystone Electronics 5000 4,TP5,TP6,T TEST POINT 43 HOLE 65 PLATED BLACK Keystone Electronics 5001 PSoC3 Mixed-Signal Array Cypress Semiconductor CY8C3866AXI-040 CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 200: A.3.5 Cy8C55 Family Processor Module

    Keystone Electronics 5000 7,TP8 TP2,TP9 CONN, TEST POINT, BLACK, TH Keystone Electronics 5001 IC, PSoC5,CY8C5568AXI-060, TQFP-100, Cypress Semiconductor #REF! CRYSTAL 32.768 KHZ CYL 12.5PF CFS308 Citizen America Corporation CFS206 32.768KDZF-UB CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 201 CRYSTAL, 24 MHz, 30 ppm, HC49, SMD ECS Inc. ECS-240-12-5PX-TR DO NOT INSTALL R6,R7,R14,R RES NO LOAD 0805 SMD 15,R16,R17 R10,R34,R35 RES NO LOAD 0603 SMD ,R37,R43 TP10 TEST POINT 43 HOLE 65 PLATED WHITE CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 202 Board Specifications and Layout CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 203: Appendix B. Miniprog3

    MiniProg3 must be disconnected from the USB port and reconnected. Programming in Power Cycle Mode Do not perform power cycle mode programming with PSoC Programmer on the CY8CKIT-001. This is due to the design of the CY8C38 family module. VTARG of the MiniProg3 is wired exclusively to VDDIO1 of the chip on the module.
  • Page 204: B.4 Protection Circuitry

    The design provides level translators that interfaces with any I/O voltage in the range of 1.2 V to 5.5 V without damage and function properly. There are two different level translators used in the design. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 205: Appendix C. Miniprog3 Technical Description

    Table C-1. Connectors / Communication Protocol Support Connector ISSP JTAG SWD and SWV 5-pin Supported Supported 10-pin Supported SWD and SWV a. SWV trace is only available with SWD debugging. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 206: C.1 Interfaces

    Interfaces C.1.1 ISSP In-System Serial Programming (ISSP) is a Cypress legacy interface used to program the PSoC 1 family of microcontrollers. MiniProg3 supports programming PSoC 1 devices through the 5-pin connector only. For more information about the ISSP interface, see the PSoC 1 Technical Reference Manual.
  • Page 207: C.2 Connectors

    (provided) to mate to a similar connector on the target board. The recommended mating connectors are the Samtec FTSH-105-01-L-DV-K (surface mount) and the FTSH-105-01-L-D-K (through hole) or similar available from other vendors. The signal assignment is shown in this figure. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 208 Be sure to connector. Be sure to allow room. allow room. VTARG VTARG Pin 1 Pin 1 CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 209: C.3 Power

    3.3 V, or 5 V. The 5-V supply may be as low as 4.25 V or as high as 5.5 V, as it is supplied directly from the USB port. CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 210 MiniProg3 Technical Description CY8CKIT-001 PSoC Development Kit Guide, Doc. # 001-48651 Rev. *J...
  • Page 211 Mouser Electronics Authorized Distributor Click to View Pricing, Inventory, Delivery & Lifecycle Information: Cypress Semiconductor CY8CKIT-008...

This manual is also suitable for:

Cy8c28 seriesCy8c38 seriesCy8c55 series

Table of Contents