UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Adam Taylor’s MicroZed Chronicles Part 31: Systems of Modules, Driving RGB NeoPixel LED arrays

by Xilinx Employee on ‎05-05-2014 09:48 AM (20,241 Views)

By Adam Taylor

 

Since I started writing this now epic blog over 6 months ago, I have explained a number of detailed aspects of both the Zynq All Programmable SoC’s PS (Processor System) and PL (Programmable Logic) along with providing nice, simple, easy-to-use examples. Having introduced the MicroZed I/O Carrier Card in the previous instalment, we have reached a point where we can pull together a number of the aspects we looked at previously to see how they all come together easily.

 

This example will look at driving an Adafruit NeoPixel digital RGB LED array from the PL under the control of the PS. We will pull together the following aspects:

 

  1. Developing a PL peripheral to drive the NeoPixels
  2. Communication between the PS and PL
  3. Using the Zynq I/O Carrier Card and the card’s PMOD expansion ports
  4. Developing a PS application that uses all of these items

 

I do not expect to wrap this all up in one blog; it will take a few. However do not worry, I have everything already implemented and working so there will be no issues along the way and I will take the time to explain it all in detail.

 

At this point a few of you might be asking what a NeoPixel is. They are individually addressable LED’s. Each NeoPixel contains a red, green, and blue LED under the control of a digital controller. They come installed on a strip, as you can see from this AdaFruit photo:

 

 

 AdaFruit NeoPixel Strip.jpg

 

AdaFruit NeoPixel Digital RGB LED Weatherproof Strip

 

 

The AdaFruit NeoPixel strip has a very simple 3-wire interface consisting of power, return, and Din (Data In). You set the light output of each of the three NeoPixel LEDs (red, green, or blue) with an 8-bit value, which provides 256 brightness levels per single-color LED. When combined with the other two LEDs in each NeoPixel, you get 24-bit color (16777216 colors). The range of colors combined with the simple serial interface makes these devices very interesting for a number of applications.

 

What makes these NeoPixels even better is that pixels can be daisy chained together. Each pixel has a buffered Dout (Data Out) pin and each NeoPixel passes along the data it receives on its Din pin to the Dout pin if another command word arrives immediately after the first. In this manner it is possible to build a large strip or other arrangement of individually addressable NeoPixels with just one I/O line, provided you can power them all.

 

 

 Figure 1.jpg

 

Two NeoPixels arranged in a daisy chain

 

 

NeoPixels use the Worldsemi WS2812 intelligent control LED integrated light sources (datasheet here). These devices generally operate from a 5V supply. However, the datasheet suggests that it is possible to operate them from a 3.3v supply. The limiting factor is the need for 3.2V to 3.4V to power the blue LED. Therefore, it should be (and is) possible to power these devices using the 3v3 supply from the MicroZed I/O Carrier Card. I will explain more about this in a later blog.

 

I needed a PMOD expansion module to ensure that I could connect the NeoPixels to the MicroZed I/O Carrier Card. The PmodCON1 expansion module connector breaks out the four signal and power/return connections on the PMOD interface to six screw terminals.

 

 Figure 2.jpg

 

PmodCON1 connected to a NeoPixel strip

 

 

It is good engineering practice to define some requirements before we rush in and develop the solution. Therefore the key requirements for this application are:

 

  1. Capable of driving a variable number of NeoPixels
  2. User updateable during operation
  3. Individual addressing for each NeoPixel
  4. Each NeoPixel shall be capable of being updated during operation

 

These requirements are pretty simple but they will allow the finished application to be used in a number of ways.

 

In the next blog we will look at the architecture and implementation approach to achieve these requirements. Meanwhile, the picture below shows the initial test of the solution with just one LED being controlled.

 

 

 Figure 3.jpg

 

The first NeoPixel controlled by the Zynq

 

 

 

 Please see the previous entries in this MicroZed series by Adam Taylor:

 

 Adam Taylor’s MicroZed Chronicles Part 30: The MicroZed I/O Carrier Card

 

Zynq DMA Part Two – Adam Taylor’s MicroZed Chronicles Part 29

 

The Zynq PS/PL, Part Eight: Zynq DMA – Adam Taylor’s MicroZed Chronicles Part 28  

 

The Zynq PS/PL, Part Seven: Adam Taylor’s MicroZed Chronicles Part 27

 

The Zynq PS/PL, Part Six: Adam Taylor’s MicroZed Chronicles Part 26

 

The Zynq PS/PL, Part Five: Adam Taylor’s MicroZed Chronicles Part 25

 

The Zynq PS/PL, Part Four: Adam Taylor’s MicroZed Chronicles Part 24

 

The Zynq PS/PL, Part Three: Adam Taylor’s MicroZed Chronicles Part 23

 

The Zynq PS/PL, Part Two: Adam Taylor’s MicroZed Chronicles Part 22

 

The Zynq PS/PL, Part One: Adam Taylor’s MicroZed Chronicles Part 21

 

Introduction to the Zynq Triple Timer Counter Part Four: Adam Taylor’s MicroZed Chronicles Part 20

 

Introduction to the Zynq Triple Timer Counter Part Three: Adam Taylor’s MicroZed Chronicles Part 19

 

Introduction to the Zynq Triple Timer Counter Part Two: Adam Taylor’s MicroZed Chronicles Part 18

 

Introduction to the Zynq Triple Timer Counter Part One: Adam Taylor’s MicroZed Chronicles Part 17

 

The Zynq SoC’s Private Watchdog: Adam Taylor’s MicroZed Chronicles Part 16

 

Implementing the Zynq SoC’s Private Timer: Adam Taylor’s MicroZed Chronicles Part 15

 

MicroZed Timers, Clocks and Watchdogs: Adam Taylor’s MicroZed Chronicles Part 14

 

More About MicroZed Interrupts: Adam Taylor’s MicroZed Chronicles Part 13

 

MicroZed Interrupts: Adam Taylor’s MicroZed Chronicles Part 12

 

Using the MicroZed Button for Input: Adam Taylor’s MicroZed Chronicles Part 11

 

Driving the Zynq SoC's GPIO: Adam Taylor’s MicroZed Chronicles Part 10

 

Meet the Zynq MIO: Adam Taylor’s MicroZed Chronicles Part 9

 

MicroZed XADC Software: Adam Taylor’s MicroZed Chronicles Part 8

 

Getting the XADC Running on the MicroZed: Adam Taylor’s MicroZed Chronicles Part 7

 

A Boot Loader for MicroZed. Adam Taylor’s MicroZed Chronicles, Part 6 

 

Figuring out the MicroZed Boot Loader – Adam Taylor’s MicroZed Chronicles, Part 5

 

Running your programs on the MicroZed – Adam Taylor’s MicroZed Chronicles, Part 4

 

Zynq and MicroZed say “Hello World”-- Adam Taylor’s MicroZed Chronicles, Part 3

 

Adam Taylor’s MicroZed Chronicles: Setting the SW Scene

 

Bringing up the Avnet MicroZed with Vivado

 

 

 

Labels
About the Author
  • Be sure to join the Xilinx LinkedIn group to get an update for every new Xcell Daily post! ******************** Steve Leibson is the Director of Strategic Marketing and Business Planning at Xilinx. He started as a system design engineer at HP in the early days of desktop computing, then switched to EDA at Cadnetix, and subsequently became a technical editor for EDN Magazine. He's served as Editor in Chief of EDN Magazine, Embedded Developers Journal, and Microprocessor Report. He has extensive experience in computing, microprocessors, microcontrollers, embedded systems design, design IP, EDA, and programmable logic.