Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Reading WS2812b leftover data through I2S

Hello there,

I am currently trying to read the leftover WS2812b LED strip data which was sent using a single channel I2S. The data sent from the board (through I2S) looks like this:

with around 34 mV for high and around 2~6 mV on low. I decided not to send FFF, but 888 instead.

I am aiming to calculate the length of the LED strip. Each LED chip will read the first 24 bits of the data, cascade (discard) it, then pass it to the next one. Therefore, the strategy is to get the data after being cascaded by the last chip and calculate the length of it (which later will be divided by 24 to see how many are left).

The question is: How will I be able to read those data? I tried reading as usual (set a buffer for the i2s, start it, listen for it (delay), stop it, then check its buffer), but I got my buffer filled with all FFF instead. and a thing is that... when I tried to read anything from the pin, although I am not sending any data (the LED strip is not powered on, but connected to other's ground), there will be data, which should not happen. I assigned pin 22, 23, 24, 25 to be the i2s input pin (which will be assigned and unassigned when used or unused), and they are configured as follows:

nrf_gpio_cfg_sense_input(DIN1_PIN, NRF_GPIO_PIN_PULLDOWN, NRF_GPIO_PIN_SENSE_HIGH);

Thank you in advance.

Parents
  • Hi,

    I do not have any experience with the WS2812b so my questions may be obvious, but what do you mean by "34 mV for high and around 2~6 mV on low"? Where is this? What is the voltage of the high and low states out of the WS2812b? Do you use a level shifter somewhere, or have you connected the WS2812b directly to the nRF (both for writing and reading)?

    In your test where you read without sending anything, what is the voltage of the data out signal from WS2812b? You write that "there will be data" in this case, meaning that the DOUT of WS2812b changes, even if no data is clocked in?

Reply
  • Hi,

    I do not have any experience with the WS2812b so my questions may be obvious, but what do you mean by "34 mV for high and around 2~6 mV on low"? Where is this? What is the voltage of the high and low states out of the WS2812b? Do you use a level shifter somewhere, or have you connected the WS2812b directly to the nRF (both for writing and reading)?

    In your test where you read without sending anything, what is the voltage of the data out signal from WS2812b? You write that "there will be data" in this case, meaning that the DOUT of WS2812b changes, even if no data is clocked in?

Children
No Data
Related