Announcements

Curious on how you can apply PSoC™ 6 to Smart Home Appliances? Register for the ASEAN Smart Home Appliance Webinar here to find out how.

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

PSoC™ 6 Forum Discussions

Andre_lyl
Level 1
5 sign-ins First reply posted First question asked
Level 1

Hello, I am doing a project with PSoC 63 BLE pioneer kit and WS2812b LED matrix. And I found alan has posted a tutorial about how to control WS2812 with PSoC 6 DMA.  And I downloaded the code and running the program on my own kit. But it didn't work. I use the oscilloscope to measure the signal from the output port(p0.3), there is no signal.  can someone tell me how to solve this problem? I am now a beginner of PSoC and stuff with hardware, I really don't know how to solve it. I noticed that the PSoC 6 is a 3.3v microcontroller and the WS2812 is a 5V component. Do I need to add a level shifter between them?

The following is the blog and code I use and my hardware connection. 微信截图_20210315154242.pngBlog: https://iotexpert.com/psoc-6-dma-ws2812-leds/

0 Likes
1 Solution
BragadeeshV
Moderator
Moderator First question asked 1000 replies posted 750 replies posted
Moderator

Hi @Andre_lyl ,

1. Did you probe the MOSI pin P13.0 that has the output of the SPI? Can you please let me know how you are controlling P0.3? I do not see in your code where you are controlling P0.3

2. It is recommended to use a level shifter since the voltage levels at  these two interfaces are different.

3.  The project is menu driven using UART terminal. It is required to enable the channel to start the DMA transfer so that you see some output in the MOSI pin. Did you give an input from the UART terminal to trigger the DMA transfer?

Regards,
Bragadeesh

View solution in original post

0 Likes
3 Replies
AlanH_86
Employee
100 replies posted 50 replies posted 25 solutions authored
Employee

Here is a non-dma version which works well.

https://github.com/iotexpert/ws2812_led

 

0 Likes
BragadeeshV
Moderator
Moderator First question asked 1000 replies posted 750 replies posted
Moderator

Hi @Andre_lyl ,

1. Did you probe the MOSI pin P13.0 that has the output of the SPI? Can you please let me know how you are controlling P0.3? I do not see in your code where you are controlling P0.3

2. It is recommended to use a level shifter since the voltage levels at  these two interfaces are different.

3.  The project is menu driven using UART terminal. It is required to enable the channel to start the DMA transfer so that you see some output in the MOSI pin. Did you give an input from the UART terminal to trigger the DMA transfer?

Regards,
Bragadeesh
0 Likes
Andre_lyl
Level 1
5 sign-ins First reply posted First question asked
Level 1

Hi, Thanks for your reply. I think I misunderstand the code, I thought p0.3 is the output of DMA, but it's not. Now I connected the signal line of LED Matrix to the MOSI pin and I found LED Matrix starts to work.😁

0 Likes