Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Kenshow
Level 8
Level 8
Distributor - Marubun (Japan)
50 solutions authored 25 solutions authored 10 solutions authored

Hi all,

I am making some programs for beginners using Modus ToolBox 2.1. When migrating the development environment from PSoc Creator to Modus, I had a hard time creating a simple program. Especially, there are few simple samples using the Device Configuration tool.

Here, a simple program for the M4 core of PSoC 6 using the Device Configuration tool of Modus Toolbox2.1 is introduced here.

The environment is as follows.

ModusToolbox2.1

CY8CKIT-062-BLE

This time it's a simple thing to control LED lighting from SW2 of Kit. With PSoC Creator, it was possible to wire GPIOs in the circuit viewer, but with Modus Toolbox 2.1 it is not possible, so I use software to read and write GPIOs.

Select the CY8CKIT-062-BLE kit from the New Application tool in the Quick Panel and use it based on what was created in the empty PSoC 6 app.

About the pin setting, start the Device Configuration tool from the Quick Panel in the IDE of Modus Toolbox2.1, and set it according to the following procedure.

1.png

Select the Pin tab.

Check P0 [4], name it "SW2", and select Drive Mode "Resistive Pull-Up, Input buffer on".

2.png

Check P0 [3], name it "LED" and select "Drive Mode" as "Strong Drive, Input buffer off".

The program uses the following GPIO functions in for loop. The port name in the function can use the name specified in Device Configuration.

:

for (;;)

    {

        Cy_GPIO_Write(LED_PORT,LED_NUM, Cy_GPIO_Read(SW2_PORT,SW2_NUM));

    }

}

Now you can easily turn on the LED from SW2.

It's very easy. First, why don't you get used to Modus toolbox from this program?

Thanks,

Kenshow

0 Likes
1 Reply
Takashi_M
Moderator
Moderator
Moderator
1000 replies posted 500 solutions authored 750 replies posted

Dear Kenshow-san,

Thank you very much for your sharing this CE.

regards.

0 Likes