nicoverduin wrote:
As I am playoing around alot with the WS2812b.... Could UART actually be used as the pulse widths determine the "0" and "1"?
I don't now. But the idea in more detail is the following:
WB: Number of WS2812 Bits per UART Char
USYMB: UART Symbols per UART Char inclunging start-bit and stop-bit
WS: time of WS2812 short pulse
WL: time of WS2812 long pulse
UBAUD: Baudrate of UART
Sending USYMB Symbols within the time of WB*(WS+WL)
-> UBaud= 1/ ( WB*(WS+WL)/Usymb)
Example 1
WB=3 (3*8=24) -> 8 UART char per WS2812-LED
USYMB=9 -> 7 data bits
WS=0.4us
WL=0.8us
=> UBAUD= 2.5Mbps
Send the 3 WS2812 bits "011":
1. Ratio (1:2): 100 110 110
2. Inverse: 011 001 001 (costaud wrote about HOWTO inverse the UART output)
3. Consider start and stop bit (0)11 001 00(1) (it's inversed now)
4. Reverse data : (0) 00 100 11 (1) (After start-bit, UART sends LSB of data first)
5. Data word to UART: x00 100 11 (UART is set to 7 Bit, but interface is byte)
Example 2
WB=3 (3*8=24) -> 8 UART char per WS2812-LED
USYMB=9 -> 7 data bits
WS=0.5us
WL=1.0us
=> UBAUD= 2.0Mbps
Examble 3
WB=2 (2*12)=24 -> 12 UART char per WS2812-LED
USYMB=8 -> 6 data bits
WS=0.3125us
WL=0.9375us
Ratio (1:3)
=> UBAUD= 3.2Mbps
Edit: Replaced "wrong name" by costaud. sorry.Statistics: Posted by Lars R. — Thu Nov 06, 2014 6:22 pm
]]>