Help with getting started with an LED driver (AS1100PL)

Has anybody played with one? I've tried to find some examples of using the chip with an Arduino with no success (yea I probably should have seen what models were popular before getting them, at least they were free.) Any sample sketches/diagrams would be appreciated.

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.

Thanks for the advice, I'll grab a 74HC595. The joys of being a noob :stuck_out_tongue:

My 74HC595 chips arrived today. On the guide I noticed that the circuit diagrams (not the actual breadboard pictures) on the tutorial page appear to be incorrect http://arduino.cc/en/Tutorial/ShiftOut. The pin labeled as Q0 is actually Q1, pin Q7 is GND to name a few.

Another question, could I safely hook up a small microcontroller that uses 3.3 volts to operate the 74HC595 and supply the 74HC595 with an external 5 volt supply?

By the way, has anybody tried manually clocking in the data using switches instead of a microcontroller? I might try that tomorrow.

I'm now looking at the AS1113, it appears that you can drive it similarly to the 74HC595 (each bit controls the pin state of the pin that corresponds to that pin.) It also looks like I would only have to use one resistor to limit the current for all LEDs by placing it between the REXT pin and ground. So to wire that up I would just need to hook up the clock(CLK), latch(LD), data (SDI), vcc(VDD), ground, REXT pins (and of course the LED pins that I plan to use)?

UPDATE: Nevermind, apparently it's not available in a DIP package.

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CC4QFjAA&url=http%3A%2F%2Fwww.ams.com%2Feng%2Fcontent%2Fdownload%2F1208%2F6983%2Ffile%2FAS1113_Datasheet_v1_04.pdf&ei=iaObUcKPD8L40gGv04GQCw&usg=AFQjCNGafd3IuC6xlcf8We2GykyWGOWUpw&sig2=ONdHqgUA1JCDwUU-gWfBLw&bvm=bv.46751780,d.dmQ

It might work, but if they don't read the other sources I suspect they won't read a sticky. Just an opinion (that I'm willing to change).

I've had beginners argue with me about the subject, they want to treat them like light bulbs and that is all there is to it.
You can find more info in here http://agicoledspot.blogspot.com/

Ok I back to playing with the AS1100 chip. I managed to get it in test mode. Now the problem is that only DIG0 of the DIG 0-DIG7 pins is on.

My sketch code below:

int latchPin = 8;

int clockPin = 12;

int dataPin = 11;
int speed1 = 50;
void setup() {
  //set pins to output so you can control the shift register
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);


twelvebit(1,1,1,0,0,0,0,0,0,0,0,1);  //sets clock to external


twelvebit(1,1,1,1,0,0,0,0,0,0,0,1);  //turns on display test
}
void loop() {
  
}

void clockpin(){
 digitalWrite(clockPin, HIGH);
 digitalWrite(clockPin, LOW);
}

void twelvebit(byte b1, byte b2, byte b3, byte b4, byte b5, byte b6, byte b7, byte b8, byte b9, byte b10, byte b11, byte b12){
digitalWrite(latchPin, LOW);
  digitalWrite(dataPin, LOW);
  clockpin();
  digitalWrite(dataPin, LOW);
  clockpin();
  digitalWrite(dataPin, LOW);
  clockpin();
  digitalWrite(dataPin, LOW);
  clockpin();
  digitalWrite(dataPin, b1);
  clockpin();
  digitalWrite(dataPin, b2);
  clockpin();
  digitalWrite(dataPin, b3);
  clockpin();
  digitalWrite(dataPin, b4);
  clockpin();
  digitalWrite(dataPin, b5);
  clockpin();
  digitalWrite(dataPin, b6);
  clockpin();
  digitalWrite(dataPin, b7);
  clockpin();
  digitalWrite(dataPin, b8);
  clockpin();
  digitalWrite(dataPin, b9);
  clockpin();
  digitalWrite(dataPin, b10);
  clockpin();
  digitalWrite(dataPin, b11);
  clockpin();
  digitalWrite(dataPin, b12);
  clockpin();
  digitalWrite(latchPin,HIGH); 
  
}

After some more research it appears that it's almost identical to the MAX7219CNG. I've been playing around with the example code, but all I could get was all LEDs flashing momentarily. Arduino Playground - Max7219