relay card problem


prejudice built board 8 relays 5v self powered, can not work despite having read forum few topics place sketch of proof have replaced since = b11111111 + + , leds instead of light result accentono give me hand card work??



/ / pin8 used enable writing
/ / on shift register
enable int = 8;
/ / pin11 used send data
uscitadatoseriale int = 11;
/ / pin12 used generate clock
dataclock int = 12;

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

void setup ()
{
   / / septum pins outputs
   pinmode (enable, output);
   pinmode (dataclock, output);
   pinmode (uscitadatoseriale, output);
   / / serial monitor (debug)
   serial.begin (9600);
}

void loop ()
{
   / / baffle 8 outputs of shift register 1
   data + +;
   / / send value serial monitor
   serial.println (given);
   / / enable writing
   digitalwrite (enable, low);
   / / send data
   shiftout (uscitadatoseriale, dataclock, lsbfirst, data);
   / / disable writing
   digitalwrite (enable, high);
   / / delay
   delay (5000);
}

on relay board pin 4 goes 74hct95 pins 12 , 13. think after send shiftout command pulse pin 4 high low. has low data appear on output drive relays. in source see variable given don't use in loop. use data didn't see define it. i'm kinda new arduino have been using avr assembler years.

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

here info nick using 74hc595 spi. has data on chip.
you have latch , enable output drive relays.
don


Arduino Forum > Using Arduino > Installation & Troubleshooting > relay card problem


arduino

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial