Demand Peripherals     Robotics and Automation Made Easy

WS28: Quad WS2812 Interface

The WS28 peripheral lets you control four strings of up to 64 WS2812 style RGB(W) LEDs.



The gpio4 cards have 3.3 volt outputs which is not sufficient to drive the WS2812 LED directly. You need to add a level translator to get the output voltage up to the 4 volts required by the WS2812 LEDs. If your level translator inverts the signal you can invert the outputs of the WS2812 interface by setting the config value to 1.



led : which LED string to set and its value
The first parameter is which of the four LED strings to address and the second parameter is a sequence of hex characters to write to the string. The number of hex characters must be even since LEDs have 3 or 4 bytes of LED data. Use three bytes per LED for RGB and four bytes per LED for RGBW LEDs.

config : whether to invert the output or not
Set the config value to 1 to invert all four output signals. This may be needed if you level translator inverts the signal. The power up default is to have no inversion.



dpset ws28 config 1
dpset ws28 led 1 ffffffffffffffffffffffffffffffffffffffffffffffff
dpset ws28 led 4 111111111111111111111111111111111111111111111111
dpset ws28 led 4 00ff00ff00000000ff00ff00ff00000000ff00ff00ff0000


FPGA Defined Peripherals
User Interface
FPGA Configuration
FPGA Buttons & LEDs
Host Tx/Rx Interface
AVR Interface
Stereo Audio Amplifier
Text LCD and Keypad
Quad WS2812 Interface
Quad Slide Pot
IR Recv/Xmit
6 Digit LCD
RC Decoder
Keyfob RF Decoder
Rotary Encoder Interface
Quad Touch Interface
Motion Control
Dual DC Motor Controller
Dual Quadrature Decoder
Quad 13 Bit Servo
Bipolar Stepper Controller
Unipolar Stepper Controller
Simple Input / Output
Quad Binary Output
Quad Binary Input
Octal Input/Output
32 Channel Binary Output
32 Channel Binary Input
Quad Serial Output
Octal Serial Output
Octal 12-bit ADC
Quad Ping))) Interface
Pololu QTR Interface
Octal SRF04 Interface
Generic I2C
Generic SPI
Octal 8-Bit DAC
Quad Digital Potentiometer
Quad PWM Output
Quad PWM Input
Quad Event Counter
Real Time Clock
Dual Pulse Generator

Interface Cards
Control Cards
User Interface
Stereo Audio Amplifier
IR Recv/xmit
Six Digit LCD Display
Keyfob RF Receiver
Rotary Encoder
Quad Switch Card
Text LCD / keypad
Quad Slide Pot
Quad Touch Interface
Motion Control
Dual 7-amp H-bridge
Quad Open Drain Driver
Quad 10 Amp Relay Card
Input / Output
Octal 8-Bit DAC
Quad Digital Potentiometer
Octal 12-bit ADC
Octal SRF04
I2C Prototyping
SPI Prototyping
USB 2.0 Hub
Real Time Clock
Octal Input/Output
32 Channel Input
32 Channel Output
Power Distribution Card
15 Amp Power Distribution
5 Volt Switching Regulator
ATX Power Break-Out Card
Disk Drive Power Break-Out
MP43 Aluminum Mounting Plate
WW4 Large Prototyping Card
WW2 Prototyping Card
WW1 Small Prototyping Card
SMP SMD Prototyping Card