relay card problem

prejudice I built a board with 8 relays 5v self powered, I can not get it to work despite having read the forum a few topics place the sketch of proof where I have replaced since = b11111111 to as + + and LEDs instead of light as a result you accentono all you could give me a hand the card to work??

/ / The pin8 is used to enable writing
/ / on the shift register
Enable int = 8;
/ / the PIN11 is used to send the data
UscitaDatoSeriale int = 11;
/ / The pin12 is used to generate the clock
DataClock int = 12;

/ / variable that contains the data to write on
/ / shift register
bytes given = 0;

void setup ()
{
/ / Septum pins as outputs
pinMode (Enable, OUTPUT);
pinMode (DataClock, OUTPUT);
pinMode (UscitaDatoSeriale, OUTPUT);
/ / For the serial monitor (debug)
Serial.begin (9600);
}

void loop ()
{
/ / baffle all 8 outputs of the shift register to 1
data + +;
/ / send the value to the serial monitor
Serial.println (given);
/ / enable writing
digitalWrite (Enable, LOW);
/ / send the data
SHIFTOUT (UscitaDatoSeriale, DataClock, LSBFIRST, data);
/ / Disable writing
digitalWrite (Enable, HIGH);
/ / delay
delay (5000);
}

Snapshot_20120512.jpg

Schema_Scheda_Potenza_Optoisolata_8Rele_Seriale_HC595.pdf (393 KB)

Seregrafia_Scheda_Potenza_Optoisolata_8Rele_Seriale_HC595.pdf (237 KB)

on the relay board pin 4 goes to the 74hct95 pins 12 and 13. I think that after you send the shiftout command then you pulse pin 4 high then low. It has to be low to get the data to appear on the output to drive the relays. In your source I see a variable given but you don't use it in loop. You use data which I didn't see you define it. I'm kinda new to Arduino but have been using AVR Assembler for years.

http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf

Here is some info from Nick he is using a 74hc595 with spi. but it has data on that chip. You have to latch it into the and then enable the output to drive your relays. Don

watch this video I was looking at some of his other videos and thought it would help you understand the 74hc595 latching and driving the outputs. If you watch the first part you will see why didn't build this board with the 164 shift register. The relays would chatter as data is shifted into the register. I hope that helps you good luck. Where did you purchase this board at?

http://www.youtube.com/watch?v=h84cDS7_9Pg&feature=colike Don