The HL1606 is not a common chip for most people, so the best way to explain it is to say its basically a 74HC595 shift register. Like a '595 there is an SPI input and then there is a shift-output so you can chain them. The HL1606 has 6 outputs and they're specifically for driving LEDs. The most basic way to use them is to set each LED on or off. This means you can have up to 8 primary 'colors' on an LED: red, yellow, green, teal, blue, violet, white and black.

There are some pros and cons to driving the strips this way… 
Pro: Very simple, easy and fast. Use any 3 pins, No interrupts or constant updating required.
Con: Only a handful of colors.

Let's get the strip up and running using this method to start.

The most important thing to remember is that you need a lot of current (power) to drive these strips, so you will need to arrange a 5V power supply. This test will require about 1 Ampere per meter!

Note in the image above that the 5V can come from a separate power supply that can provide the power you need. Be sure to tie the grounds together and check the polarity…sticking -5V by accident into the strip could be a sad and expensive mistake. We'll be using an Arduino to demonstrate the strip but the code can easily be ported to your favorite microcontroller.

Note that we have Latch connected to digital I/O pin #2, Clock connected to #3 and Data to #4

To install the required library, first, open up the Arduino library manager:

Search for the HL1606 library and install it

We also have a great tutorial on Arduino library installation at:
http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use

You should now see a new example folder called HL1606strip and inside, an example called basicPatterns. Upload that sketch to your Arduino. You should see the following:

You can change how long the strip is by adjusting the object creation (instantiation) line:

HL1606strip strip = HL1606strip(STRIP_D, STRIP_L, STRIP_C, 32);

The last argument "32" is the number of LEDs to address. Count how many are in your strip! The display may be wonky otherwise

The basicPatterns sketch has many examples of how to set the color of each pixel by calling

 strip.setLEDcolor(n, color);

where indicates which LED you want to change and color is RED, YELLOW, GREEN, TEAL, BLUE, VIOLET, WHITE, or BLACK. After you've set the pixel color, you need to write the changes to the strip by calling

 strip.writeStrip();

writeStrip() isnt very fast, it will take a few milliseconds to write the changes and it takes longer the more LEDs there are. So change all the LED's you want at once and then write them!

This guide was first published on Jul 29, 2012. It was last updated on Jul 29, 2012.

This page (Basic Usage) was last updated on Jul 19, 2012.

Text editor powered by tinymce.