Problem when using PSOC6 DMA to control WS2812b

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

cross mob
lock attach
Attachments are accessible only for community members.
Andre_lyl
Level 1
Level 1
5 sign-ins First reply posted First question asked

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
Moderator
First question asked 1000 replies posted 750 replies posted

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
Employee
100 replies posted 50 replies posted 25 solutions authored

Here is a non-dma version which works well.

https://github.com/iotexpert/ws2812_led

 

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

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

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