9 Replies Latest reply on Jul 11, 2020 2:04 AM by MoTa_728816

    choose Pin and port for Cypress CY8CKIT-050 5LP

    abho_4730071

      Hi team,

      How to choose Pin and port for Cypress CY8CKIT-050 5LP. I am working on blinking the LED, but after building successfully when i select Debug -->Program i am getting the issue as below. Unable to select it. I am not sure what will be the port and pin execute it. Please help me on this...

       

        • 1. Re: choose Pin and port for Cypress CY8CKIT-050 5LP
          NoriakiT_91

          You can use the "Pins" tab of the "Design Wide Resource" file.

          GS004811.png

           

          In the "Pins" tab, You can select a port associated to the pin on the schematic.

          GS004812.png

           

          Regards,

          Noriaki

          • 2. Re: choose Pin and port for Cypress CY8CKIT-050 5LP
            MoTa_728816

            Hi,

             

            If you are having problem with programming the board,

            please visit CY8CKIT-050 page

            https://www.cypress.com/documentation/development-kitsboards/cy8ckit-050-psoc-5lp-development-kit

             

            And download Kit Guide

            https://www.cypress.com/file/45276/download

             

            In the Chapter 3. Kit Operation, 3.1 Programming PSoC 5LP Device

            001-Program_device.JPG

            In terms of LEDs

            LED3 : P6[2]

            LED4: P6[3]

             

            I think that you can use jumper wire(s) to light LED1 and LED2 on the board.

             

            To assign port/pin for an output pin in PSoC Creator, you can refer to Noriaki-san's answer.

             

            moto

            • 3. Re: choose Pin and port for Cypress CY8CKIT-050 5LP
              abho_4730071

              HI Team,

              I am not able to see P6[2] and P[3] pin . If i am taking any available pin then also my led is not blinking.

              Below is my program .

                for(;;)

                  {

                      /* Place your application code here. */

                      LED_Write(0);

                      CyDelay(500);

                       LED_Write(1);

                      CyDelay(500);

                  }

              • 4. Re: choose Pin and port for Cypress CY8CKIT-050 5LP
                MoTa_728816

                Hi,

                 

                I wonder where you are (lol)

                 

                At first let me confirm the followings...

                (A) You are using CY8CKIT-050 5LP development kit in the URL below.

                https://www.cypress.com/documentation/development-kitsboards/cy8ckit-050-psoc-5lp-development-kit

                 

                (B) You have downloaded and installed PSoC Creator

                https://www.cypress.com/products/psoc-creator-integrated-design-environment-ide

                 

                Then to make the confusion as little as possible, please make directory (folder)

                C:\Cypress

                C:\Cypress\workspace

                 

                Then please follow the steps below

                (1) Start PSoC Creator

                002-PSoC_Creator_started.JPG

                (2) From Menu Select File > New > Project...

                003-New-Project.JPG

                (3) Create Project Dialog will be shown.

                In the Select project type

                select Target device

                [ PSoC 5LP ]

                Then use drop down menu to select <Launch Device Selector...>

                 

                004-device-selector.JPG

                 

                (4) In the Device Selector window, scroll and find "CY8C5868AXI-LP035" and select OK

                005-device-selected.JPG

                (5) Now your Target device should be set [ PSoC 5LP ][ CY8C5868AXI-LP035 ]

                then select [ Next > ]

                006-Device-selected2.JPG

                (6) In the Select project template, select "Empty schematic" and select [ NEXT > ]

                007-Select-project-template.JPG

                (7) In the Create Project, enter

                Workspace name: workspace

                Location: C:\Cypress\

                Project name: Design01

                Then select [ Finish ]

                008-location.JPG

                (8) The dialog window disappeared, and now you are back in the PSoC Creator Workbench.

                In the left pane, there is a new project "Design01" should be created.

                009-project-created.JPG

                (9) Although this is optional, but I usually click on the Editor area ("TopDesign.cysch") tab then

                select the zoom size in the left upper dropdown menu to 100% or larger.

                010-zoom.JPG

                (10) Now the editor window is easier to see/operate.

                Then in the right side pane, "Component Catalog"

                Select Cypress tab

                Expand Ports and Pins folder

                Then select a "Digital Output Pin" and drag it on to the Editor area (in the TopDesign.cysch) and place the pin there.

                011-component-catalog-pin.JPG

                (11) Now you should see "Pin_1" component there.

                Then double click the "Pin_1" component to open its configuration window.

                012-pin_1-placed.JPG

                (12) When the configuration window for "Pin_1" is open, do follow

                Change the name to: LED

                Uncheck the box of HW Connection

                Change Initial drive state: High(1)

                Then select [ OK ]

                013-Pin_config.JPG

                (13) Now you should see "LED" in the TopDesign.cysch (which we call "schematic")

                014-pin_is_now_led.JPG

                (14) In the left pain under Project > Design Wide Resources, double click Pins.

                There should be pin assignment window "Design01.cydwr" opened.

                In the right side of the tab, where you see "Name | Port | Pin | Lock"

                use the drop down menu at the Port LED and select P6[2]. (You might need scroll down to see the port)

                015-pin_select.JPG

                (15) Now, LED pin is set to P6[2]

                016-pin-selected.JPG

                (16) Now we are ready to let PSoC Creator generate application for this configuration.

                Select "generate application" icon.

                017-generate-application.JPG

                (17) It takes a while, then application (and drivers etc) for this project will be generated.

                You can see system generated staff under "Generated_Source"

                018-appliation-generated.JPG

                (18) Now, double click "main.c"

                You will see the "default" main.c there.

                019-main_c_new.JPG

                (19) To follow your program, I modified main.c as below

                020-main_c.JPG

                (20) Then connect your CY8CKIT-050 to your PC via USB cable like below,

                in case you have not done so.

                You may need to wait a while till your PC detect the board.

                001-Program_device.JPG

                (21) Then select "debug" icon from the icon menu.

                021-Debug.JPG

                (22) Hopefully, this will compile and download the program onto your CY8CKIT-050 and let you start debugging it.

                Note: As I don't have CY8CKIT-050 5LP, I could not test further.

                 

                moto

                P.S. Just in case, I attached my project.

                • 5. Re: choose Pin and port for Cypress CY8CKIT-050 5LP
                  abho_4730071

                  Hi ,

                  The project you sent working fine and  i am able to see P6[2] pin. but in my project i am not able to see that pin. Any configuration need to change for this?http://

                   

                  • 6. Re: choose Pin and port for Cypress CY8CKIT-050 5LP
                    MoTa_728816

                    Hi,

                     

                    > The project you sent working fine and  i am able to see P6[2] pin.

                    That is good news.

                     

                    > but in my project i am not able to see that pin.

                    This means that something is wrong with your project.

                    By any chance, could you try to follow the steps I showed by yourself?

                     

                    > Any configuration need to change for this?

                    The URL you put was not valid.

                    Please attach the archive of your project using the method shown in the following discussion.

                    Re: How to attach a project archive file to a question?

                     

                    moto

                    • 7. Re: choose Pin and port for Cypress CY8CKIT-050 5LP
                      MoTa_728816

                      BTW,

                       

                      Reading from your description, the scenario most likely happening is

                      you chose wrong device for your project.

                       

                      To check this please see the title of the project in the Workspace Explorer.

                      The name of the project is followed by the name of the device.

                      In my sample below

                      Project 'Design01' [CY8C5868AXI-LP035]

                      Design01 is the project name

                      CY8C5868AXI-LP035 is the device chosen for the project.

                      030-Workspace-Explorer.JPG

                       

                      So I imagine that in your project, the device is something different.

                      To change the device to CY8C5868AXI-LP035, follow the steps below.

                       

                      (1) Select the line "Project '<project_name>' [DEVICE_NAME]" and right click for the pop up menu

                      then select "Device Selector..."

                      031-project-device-select.JPG

                       

                      (2) "Select Device" window will show up.

                      Use the scroll bar to find "CY8C5868AXI-LP035" and select it then select [ OK ]

                      032-Device-selector.JPG

                      (3) Now the Device name in the right of the project name in (1) should show [CY8C5868AXI-LP035].

                       

                      (4) If you followed up to here, (I hope that) you can select P6[2] in the pin list.

                       

                      moto

                      • 8. Re: choose Pin and port for Cypress CY8CKIT-050 5LP
                        abho_4730071

                        Thanks... its working, but If i convert the same program to c# what change i need to do?

                        I followed the below steps but not working.

                         

                        1.I removed 4 lines of code from the main.h.

                        2.I created a a new file under source files called Main.cs

                        3.Added the below code.

                        using System;

                         

                         

                        public static void Main()

                        {

                            while(true)

                            {

                                LED_Write(0);

                                CyDelay(500);

                                LED_Write(1);

                                CyDelay(500);

                            }

                        }

                        4. Build and program

                        But i am not able to see any change even i change the Delay value.

                        • 9. Re: choose Pin and port for Cypress CY8CKIT-050 5LP
                          MoTa_728816

                          Hi,

                           

                          > Thanks... its working, but If i convert the same program to c# what change i need to do?

                          So I hope that I could answer to "this" question.

                           

                          And now you are asking how to convert a PSoC Creator Project to C# project.

                          Which is a totally different question.

                           

                          I think that is a question which should be answered in your other discussion below.

                          How can i integrate Psoc with c#.net?

                           

                          Meantime, since I hope that I could answer "this" question,

                          I would appreciate it if you could mark my response as "Helpful" or "Correct Answer".

                           

                          moto