Tuesday, 11 November 2025

WS2812 PSoC5 Creator Project

Introduction 
This short blog continues a previous post about a WS2812 addressable LED for an Infineon (Cypress) PSoC 4 microcontroller. This blog focuses on the project for the PSoC 5 with testing performed on a CY8CKIT-059 development board.

Rebuilding the Project
The PSoC5 project, ‘ws2812_test’, was downloaded from a post on the Infineon Community site.

Upon opening the PSoC5 project, the same issue noted in the previous blog with the PSoC4 was observed. The missing component is evident in the top-level design of the PSoC project.

Missing Components in PSoC Top Design
Missing Components in PSoC Top Design

Unlike the previous post, where the WS2812 library was not included in the compressed project, the WS2812 library is included in the compressed project.

WS281xLib in PSoC Project Folder
WS281xLib in PSoC Project Folder

The issue with the missing component was resolved by updating the project Dependencies in PSoC Creator.

PSoC Creator Dependencies - StripLightLib Error
PSoC Creator Dependencies - StripLightLib Error

The dependency for the existing WS2812 library was deleted. Next, the dependency for WS281xLib was added again to the project. The WS2812 folder in the local ws2812_test project was chosen.

PSoC Creator Dependencies - WS281xLib
PSoC Creator Dependencies - WS281xLib

After exiting the project Dependencies window, the Top Design sheet in the project displays the previously missing WS2812 component.

Updated Components in PSoC Top Design
Updated Components in PSoC Top Design

Before rebuilding the project, a resistive pull-up was added to the SW button to suit a PSoC development board.

Switch Input Pin Configured with Resistive Pull-Up
Switch Input Pin Configured with Resistive Pull-Up

The CY8CKIT-059 development board does not appear to have a resistive pull-up connected to the pushbutton switch ‘SW’ on the development board.

CY8CKIT-059 User Push Button Connection
CY8CKIT-059 User Push Button Connection

This information is noted in Section 3.1 Theory of Operation, in the User Manual. With the default code implementation, the WS2812 will be driven by the development board as soon as the board is powered via the USB KitProg or PSoC connector.

Note from CY8CKIT-059 User Manual
Note from CY8CKIT-059 User Manual


Testing
A WS2812 module with eight LEDs was tested using the CY8CKIT-059 development board. The default code is configured for a single LED in blue, as shown below.


A modification is shown below for festive celebrations!


The LED colours for the above example were extracted from Line 117 in the PSoC project StripLights.c file. Setting of the two LED colours used with the Modulo operator, as shown below in main.c

Updated Code in Main.c from Line 54
Updated Code in Main.c from Line 54

Downloads
Linked below is an updated release of the PSoC project with the corrected dependencies to suit the CY8CKIT-059.

Updated Original PSoC5 Application - WS2812_test