Best Answer stotech, 19 November 2013 - 12:13 AM
serial in = pin 11
latch clock = pin 10
clock = pin13
/OE = Any Pin - optional
/reset = Any Pin - optional
gnd = gnd
vcc = +3.3v
/OE - set high [+3.3v] to disable outputs or low [gnd] to enable. Can just wire to gnd if you don't mind them being in random state when booting up.
/reset - set high to have chip enabled. pull low to reset it and high to enable it again. can just leave wired to 3.3v.
// We got 2 74HC595's in a chainIc74hc595 IcChain = new Ic74hc595(SPI_Devices.SPI1, Pins.GPIO_PIN_D10, 2);// Led loop back and forwardwhile (true){ for (int Counter = 0; Counter < IcChain.Pins.Length; ++Counter) { IcChain.Pins[Counter].Write(true); Thread.Sleep(50); IcChain.Pins[Counter].Write(false); } for (int Counter = IcChain.Pins.Length - 1; Counter > 0; --Counter) { IcChain.Pins[Counter].Write(true); Thread.Sleep(50); IcChain.Pins[Counter].Write(false); }}
if you've hooked up the reset or OE pins you need to pull them high or low first depending on the pin. Insert something like this at line 3.
reset_pin.Write(true);OE_pin.Write(false);
Hope this helps. The code is only for 2 but I'm sure you'll figure out the rest. After wiring the first 1 on the left side you just chain em up like this.
Grant
Go to the full post