• 0
Andras

UART disable Start bit? (for NeoPixel LEDs)

Question

Hi,

I'm trying to implement a custom protocol for NeoPixel LED arrays using a script. I need to represent the 0 and 1 data bits as signals of 0.4us high + 0.85us low and 0.8us high + 0.45us low respectively.

I implemented the custom protocol with a script already, the data pulse widths look alright and I thought I could use UART and its Protocol.UART.Send(uartMessage,true) method, but I had to realize that I can't disable UART's Start bit so the receiver will misunderstand my data.

Is there a way to disable the Start bit in the Digital Protocol?

image.png.2322fd445ce2945dd55993e2e1e4676a.png

 

Also, when I was investigating the bus, I used the Logic Analyzer and I found something interesting: when I tried to set the rate to 3.2 MHz it always jumped back to 3.125 MHz. Is this normal?

image.png.ad1041abd5301aa83bee3c107fa7a0f6.png

 

Thanks,

Andras

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 1

Szia @Andras

The UART is not suitable for RGB LED control.

You can use a custom Patterns signal and script like this to build the data sequence for WS2812 RGB LEDs.
Here you have the project: WS2812.dwf3work

The default Analog Discovery configuration allocates 1k samples for each Patterns channel with this you can control 14 LED array (1024/24/3).
With the 4th AD device configuration you will have 16k samples and can control 227 LEDs. With Digital Discovery 32k 455 LEDs...

The supported frequencies are positive integer divisions of 100MHz base frequency: 100MHz, 50M, 33.3M, ... ~3.226M, 3.125M ...

image.thumb.png.b0ba21be88e31b292c193ead48f39a7b.png

image.png.0de92170da653dfbe8a87f708d39331e.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now