Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The LED controller is implemented in LED_controller.v

The WS2812 LEDs are driven by a single data line using a timing code: WS2812.pdf
The code consists of different patterns for 1s and 0s. After 24bit (8*3 brightness levels) are received  by an LED, it passes on all subsequent codes to the next LED in the chain. Once a gap of >50us occurs in the data, the first LED will receive data again, repeating the cycle.
We therefore want to send 24*8 codes, then wait a bit, then repeat.

Here's a quick description of the state machine used to generate the data driving the 8 LEDs:

...

This information is now maintained here: https://github.com/open-ephys/rhythm/blob/master/README.md