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

PSoC™ 5, 3 & 1 Forum Discussions

user_1570836
Level 4
Level 4
50 replies posted 25 replies posted 25 sign-ins

Hello,

   

I am working on a nixie clock. For backlight I have used Adafruit's Neopixel digital LEDs(based on WS2812). My idea is that color of nixie tube's backlight will reflect which part of minute/hour/day it is. I have taken WS2812 component from somewhere on this forum, and written the code. Also, I did not write color space conversion myself, but I have rewritten some code found on the internet.

   

The problem is that at 54th second the color does not change as expected, but immediately changes to something like red.

   

To better diagnose the error, I have rewritten the code to C# Windows Forms appplication. In this form, the code, which is to my knowledge the same, does work as expected.

   

Can someone take a look at my code, and help me find the difference? I think the difference is not in the code itself, but in the architecture;,but I do not know so much about MCUs.

   

Thank you,

   

Stanislav Husár

0 Likes
4 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Can you please post your complete PSoC project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
user_1570836
Level 4
Level 4
50 replies posted 25 replies posted 25 sign-ins

I'm not sure what you want to see, it's just standard UART, a few GPIOs, and the neopixel component.

0 Likes
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Convert this line in main.c:

   

col.h = (unsigned char)((double)local_sec * 270 / 60);

   

to 

   

col.h = (unsigned char)((double)local_sec * (double)((double)270 / (double)60));

   

and tell us about your observation

0 Likes
user_1570836
Level 4
Level 4
50 replies posted 25 replies posted 25 sign-ins

Thank you for reply. I have reprogrammed PSoC, however I can't test it on hardware now. I will let you know, when I will test it.

0 Likes