I am having issues using the arduino shiftout() function with an allegro 16bit led driver. I'd like to make a single function call, to light LEDs on all pins. As think I understand it, I need to latch low, make two 8 bit shiftout() calls then latch high again, to accomplish sending 16bits of data to the a6279 chip. Is this a wrong interpretation?
Here is the code. I've also included a commented out for loop, that is supposed to be used used to cycle through 8 bits. I tried to repurpose it to cycle through combinations of 2 8bit sets of data. I could not detect that any voltage was being supplied to the led pins of the driver. I've tested my leds and verified the led driver is properly powered.
Any help, would be much appreciated. - Ben
/******************************************************************
******************************************************************/
int latchPin = 8;
int clockPin = 12;
int dataPin = 11;
void setup() {
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
}
void loop() {
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, B11111111);
shiftOut(dataPin, clockPin, MSBFIRST, B11111111);
digitalWrite(latchPin, HIGH);
delay(500);
/* for (int j = 0; j < 256; j++) {
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, j);
shiftOut(dataPin, clockPin, MSBFIRST, j);
digitalWrite(latchPin, HIGH);
delay(500);
}*/
}