Help with getting started with an LED driver (AS1100PL)

That is sort-of an advanced chip... I've never used one. Troubleshooting could be tricky when the display-chip acts differently than what you expect...

You probably should start by experimenting with a simpler shift register. There is an example project [u]here[/u]. (I have used something similar to that...) If you can write a hex value to the 74HC595 chip, and see that value displayed as an 8-bit binary "number" on 8 LEDs, you'll probably feel better about using the AS1100 chip.

You'll need to read the datasheet several times!!! Make sure you understand what all the pins are for (especially the input/control pins), how the serial communication works, and what the various commands (hex codes) do.

With this chip, you write data to an internal register by sending a 16-bit word that contains a register address (4-bits) and the data (8-bits) to be sent to the register. The 4 most significant bits are "don't care", but something needs to be sent so you'll normally send zeros.

The Windows calculator in the scientific mode can convert between hexadecimal and binary, or you can memorize the 16 conversions (0-F) and you'll be able to convert numbers of any size between hex and binary in your head!!! It's much easier than converting between decimal and binary, because each nybble (group of 4 bits) converts to exactly one hex digit. (You already know 1 and 0, so that's only 14 more to learn, and some are easy to remember like F, 5, & A.)

The datasheet shows hex and binary. I suggest you use hexadecimal in your sketch (put 0x in front of the number to indicate hex). You can use decimal if you really want to, the compiler doesn't care since everything is binary inside the microprocessor anyway. (On the AS1100 datasheet, an uppercase X means "don't care" and a zero followed by a lower case x means the following digits are hex.)


The serial data communication concept is fairly simple... once you "get it". You "clock-in" data one bit at a time, and then after you've sent-in 8 or 16-bits, you "latch" that data to the parallel outputs.

You need to assign 3 Arduino-output pins (data, clock, latch). The actual signal names might be different on various chips, but the function is the same.

  1. Write to the data pin (one bit high or low).
  2. After the data-pin is stable, write to the clock pin (With the AS1100 chip, data is read on the clock's rising-edge).
  3. Write to the clock again to reset (Write low, to get ready for another rising edge.)
  4. Write the next bit to the data pin (bit high or low).
    ... Repeat until all bits have been written (16 bits for the AS1100).
  5. When all bits have been written, Write to the latch pin. (With the AS1100, data is latched-in when on a rising edge.)
  6. Reset the load pin to get ready for the next rising edge.

Usually, the exact timing is not that critical. The important thing is that the data is stable for a short period of time, before the clock-edge comes along.