ESP8266 Developer Zone The Official ESP8266 Forum 2014-11-06T22:12:47+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=27 2014-11-06T21:14:17+08:00 2014-11-06T21:14:17+08:00 https://bbs.espressif.com:443/viewtopic.php?t=27&p=98#p98 <![CDATA[Re: Inverse UART output? (for WS2812 )]]> But why not redesign the library FastLED from Paul Stoffregen. I have worked with it before and am quite happy with it.

Statistics: Posted by nicoverduin — Thu Nov 06, 2014 9:14 pm


]]>
2014-11-06T22:12:47+08:00 2014-11-06T18:22:17+08:00 https://bbs.espressif.com:443/viewtopic.php?t=27&p=95#p95 <![CDATA[Re: Inverse UART output? (for WS2812 )]]>
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


]]>
2014-11-06T17:25:48+08:00 2014-11-06T17:25:48+08:00 https://bbs.espressif.com:443/viewtopic.php?t=27&p=94#p94 <![CDATA[Re: Inverse UART output? (for WS2812 )]]> Statistics: Posted by nicoverduin — Thu Nov 06, 2014 5:25 pm


]]>
2014-11-06T02:10:43+08:00 2014-11-06T02:10:43+08:00 https://bbs.espressif.com:443/viewtopic.php?t=27&p=89#p89 <![CDATA[Re: Inverse UART output? (for WS2812 )]]>
SET_PERI_REG_MASK(UART_CONF0(UART0) , BIT22);


0x20 UART_CONF0
uart_dtr_inv [24]
uart_rts_inv [23]
uart_txd_inv [22]
uart_dsr_inv [21]
uart_cts_inv [20]
uart_rxd_inv [19]

Statistics: Posted by costaud — Thu Nov 06, 2014 2:10 am


]]>
2014-11-05T01:44:15+08:00 2014-11-05T01:44:15+08:00 https://bbs.espressif.com:443/viewtopic.php?t=27&p=81#p81 <![CDATA[Re: Inverse UART output? (for WS2812 )]]> We will check the control register later.

This feature should add to the next generation !!
post it in the url below.
http://bbs.espressif.com/viewtopic.php?f=7&t=12

Statistics: Posted by costaud — Wed Nov 05, 2014 1:44 am


]]>
2014-11-06T05:22:25+08:00 2014-11-04T21:27:02+08:00 https://bbs.espressif.com:443/viewtopic.php?t=27&p=79#p79 <![CDATA[Inverse UART output? (for WS2812 )]]> ********** EDIT: NOTE for those who try this: After the start-bit, the UART sends LSB first. **********
**********
Hi,

is it possible to inverse the output of the UART. Output 1 instead of 0 and 0 instead of 1.

Background of Question: Using the UART for controlling WS2812 after the following scheme:
(1)xx xxx xx(0).
UART with 7 data bits.
3 Bits of WS2812.

According to viewtopic.php?f=7&t=24 , UART seems to be fast enough.

thx and regards
Lars

Statistics: Posted by Lars R. — Tue Nov 04, 2014 9:27 pm


]]>