Rotary LED Blinker with PSOC 4200M

1 Introduction

Finger fidget spinner is proposed with application of PSoC 4200, once receiving the kits, the embedded kitprog3 makes the size longer and can not fit for rotation between fingers. I shift the idea into rotary led blinker. Similar coding logic make this project can change to patterned led spinner with LUT functions(LookUp Table)

Herein I shall show how it works.


2 Hardware

2.1 CY8CKIT-043 PSoC® 4 M-Series Prototyping Kit Guide

One tiny lovely dev board, I guess. One of my most favorite with special magic.

Logic Blocks,

and pinouts,

What is in my hands,

With 11 head soft wires, connected with the LED rings in my #1 blog. But the P7.0 and P7.1 can not be configuration of output pins , and the wires is not long enough for further ones. As demo purpose, this shall not harm much with several blind eyes.

This ex-store application is breathing LED,

Here is the video,


2.2 LED rings

Remove 555 and CD4701 wiring Pin 1~7 and 9~11, 8 for GND, not so good with welding work. But have checked with magnified lens, it is OK.


3 Software

3.1 PSoC Creator 3.2

Even PSoC Creator 4.0 is available, this version works fine. In fact I prefer it to Modus Toolbox. This is definitely more fun.

With hardware_bitstream_plugins_applications.


4 Coding

4.1 Create one new project from one example, that is fine from blank project.

4.2 Design topDesign.cysch from building block from right sidebars. With quick manual, you need zero training to do the job,

4.3 Edit the LUT  and control Register

4.4 Select LED pinout for each output Pins, from drop-down selections, self-correction for any wrong selection, totally error-free.

4.5 First build and Program

Select BUILD->Program step by step, the ring led blinks in dark But irregularly not in turns. That is what I meant for.


4.6 Revise LUT and design your own patterns

Revise the LUT, the Ring pattern can be set more easy, just click-click, test-and-go.

Then bingo, the LED ring blinks in turns ,except some blinding eyes.

5 Summary

This project include Core element of FPGA in form of LUT. In fact, most FPGA bitstream are based on LUT. This PSoC 4 M-Series Prototyping Kit embedded with two block only, but already enough for everyone's imagination fly around.

Here is the program main.c for review.

#include <device.h>
uint8 i;

int main()
    /* Test each of the LUT input combinations */
    for(i = 0u; i < 128u; i++ )

The counting of number every second make the LED blink one by one. Edit the LUT can change the order and pattern of blinkers. Change the CyDelay(*parameters) can change the speed. That all can be  attributed to the magic of FPGA.