Connecting a HL1606 strip to an ATmega

I've been left a comment asking how the HL1606 strips are connected up to an Arduino. The wiring is really pretty simple, but depends on exactly which ATmega version you have, as the hardware SPI pins vary from MCU to MCU. The following assumes it's a ATmega328P as used on the more modern Duemilanoves, you'll need to refer to the MCU documentation and the board schematic to find the correct ports and pins for different Arduino versions.

The 328P uses the following pins for hardware SPI:

/CS    Port B Pin 2    (Arduino pin 10)
MOSI   Port B Pin 3    (Arduino pin 11)
MISO   Port B Pin 4    (Arduino pin 12)
SCK    Port B Pin 5    (Arduino pin 13)

I used Timer 2 to drive the fade clock on the strips. The output of Timer 2 uses the following pin:

TIMER2 Port B Pin 1    (Arduino pin 9)

The strips themselves have the following labelling on the inputs:

S-I    Fade clock input
D-I    Data input
CK-I   Data clock input
L-I    Data latch input

So you need to wire up the strip as follows:

ATmega      Strip
/CS     to  L-I
MOSI    to  D-I
SCK     to  CK-I
TIMER2  to  SI

Note that if you want to wire up more than one strip you'll need to work around the fact that the HL1601 strips don't implement the SPI protocol properly. The easiest way is to gate the SCK signal with the /CS line so that when a strip is not being accessed it doesn't see the data clock. I've detailed the problem and the solution more fully in this earlier post,

Categories : Tech, AVR


Re: Connecting a HL1606 strip to an ATmega

Thanks!

Are you going to publish source code of led-strip programs?

Re: Connecting a HL1606 strip to an ATmega

The software was done as a commission so it's unlikely I'll be releasing it, but I will be discussing some of the more interesting facets of the implementation.