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 MicroZedI/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.
Using the Zynq I/O Carrier Card and the card’s PMOD expansion ports
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 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.
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.
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:
Capable of driving a variable number of NeoPixels
User updateable during operation
Individual addressing for each NeoPixel
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.
The first NeoPixel controlled by the Zynq
Please see the previous entries in this MicroZed series by Adam Taylor: