In this project, we'll create a simple application using the CY8CKIT-050 PSoC 5LP development kit to make an LED blink. This basic experiment will help you get familiar with PSoC Creator, the integrated development environment (IDE) used for designing and programming PSoC devices. The LED will light up for 50ms and then turn off for 50ms, creating a blinking effect.
PSoC schematic diagram
The blinking led project needs the following parts:
CY8CKIT-050 PSoC 5LP Development Kit
USB Cable
Project Creation:
Open PSoC Creator.
Go to File > New > Project.
Choose the target device: PSoC5LP CY8CKIT-050 (CY8C5868AXI-LP035 chip).
Select "Empty Schematic" and name the project Blinking_LED.
Hardware Configuration:
Go to the Component Catalog on the right side of the screen, search for "Logic AND" and drag it to the TopDesign schematic.
Add a "Digital Output Pin" and connect it to the output of the AND component.
Add a "Clock" and connect it to one of the inputs of the AND component.
Add a "Logic High" component and connect it to the other input of the AND component.
Component Configuration:
Double-click the Clock component and set the frequency to 10 Hz with ±5% tolerance.
In the workspace explorer, double-click on Pins under Blinking_LED.cydwr and set Port to P6[3].
Programming and Results:
Build the design by clicking on "Build" or pressing Shift+F6.
Verify and resolve any warnings or errors.
Connect the PSoC 5LP to your computer using the USB cable.
Click on "Program" or press Ctrl+F5 to upload the code to the PSoC.
The red LED (LED4) on the board should start blinking every 0.1 seconds.
Code for main.c
PSoC real-life implementation