- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
Select the Pin tab.
Check P0 [4], name it "SW2", and select Drive Mode "Resistive Pull-Up, Input buffer on".
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,
- Labels:
-
ispn:39619:1:0
-
l1:314:1:0
-
PSoc6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Kenshow-san,
Thank you very much for your sharing this CE.
regards.