Add information about ws2812 driver

This commit is contained in:
Xiretza 2020-03-20 10:17:29 +01:00
parent e685cdea10
commit 52f3c6b0a7
Signed by: xiretza
GPG key ID: E51A6C6A1EB378ED
4 changed files with 21 additions and 1 deletions

View file

@ -113,7 +113,26 @@ The Arty development board contains an RJ-45 Ethernet jack connected to an Ether
\subsection{WS2812 driver} \subsection{WS2812 driver}
% TODO A hardware driver for WS2812 serially-addressable RGB LEDs is also included in the SoC. It was developed independently as part of the curriculum at HTL and later incorporated into the SoC.
\begin{figure}[h]
\includegraphics[width=\textwidth]{ws2812.png}
\caption{Block diagram of the WS2812 driver}
\end{figure}
\begin{figure}[h]
\centering\includegraphics[width=0.5\textwidth]{ws2812_timing.png}
\caption{Timing diagram for the WS2812 serial protocol}
\label{fig:ws2812_timing}
\end{figure}
The driver is designed to be attached to external circuitry that provides color data for any given LED index (address). This can either be discrete logic that generates the color value from the address directly, or a memory that stores a separate color value for each address.
The LEDs are controlled using a simple one-wire serial protocol. After a reset (long period of logic 0), the data for all LEDs is transmitted serially in one single blob. Each LED consumes and stores the first 24 bits of the stream and applies them as its color value (8 bits each for red, green, blue), all following bits are passed through unmodified. The second LED thus uses the first 24 bits of the stream it receives, but since the first LED already dropped its data, these are actually the second set of 24 bits of the source data.
Every bit is encoded as a period of logic 1, followed by a period of logic 0. The timing of these sections determines the value, see \ref{fig:ws2812_timing}.
The exact timing differs between models, so all periods can be customized using generics in the VHDL entity.
\subsection{DRAM} \subsection{DRAM}

1
soc/ws2812.drawio Normal file
View file

@ -0,0 +1 @@
<mxfile host="www.draw.io" modified="2020-03-21T11:04:15.081Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.14.1 Chrome/77.0.3865.129 Safari/537.36" etag="-Ab-_8s9oSbsFdSpbEoE" version="12.8.6" type="device"><diagram id="VHRTjtUijQ8ptJTQA8st" name="Page-1">7VrbktsoEP0aP2ZKgNDlMWPPJqlKNqn1biV5ZCQskcj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50YUz3bc3cOrbW3/ZgBlBGrjmMVmVxUVCN6/LL0B2uzJUxVmQkDxnwRFWDBPvH3tbbuCMD8CsZWemBdDumNnumK+av5EWmIq8jiLUUdRzfoHMaPdldkfv9yP/16ldaIN07GrkjaduEASOXIVeaIPYZpweSNdZmM55bNENNF6mfMNVH9oh/UU3ZqxOwlBCk48f605e5JvZp3NRqM37/JAXYvQ4227nm4UDab59UaDN29+sSEePM+pkRsAxw7zLZkZmlJdREm7Hj7TXvrgCeocP5aWxma4YIPeQp6Q8pS+EaCei8A5kKIduXPffl/8CpLJaf61dhST1J+/o4T8=</diagram></mxfile>

BIN
soc/ws2812.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

BIN
soc/ws2812_timing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB