shiftout: does SH_CP and DS have to be pin 11 and 12?

Hi,

I've build a waveshield and now I want to use a 595 for adding some more I/O's. The thing is, the waveshield is hardwired to communicate over pin 11 and 12, and in this tutorial: http://arduino.cc/en/Tutorial/ShiftOut it says to use pin 11 for DS and pin 12 for SH_CP.

Can I change that to any other pin or does it have anything to say that it's at those exact pins?

Søren

Hi Søren,

reread the page and you see they mean the pin 11 and 12 of the 595.
On the Arduino side you can use any pin (but preferable not 0 and 1 as that is the serial port).

robtillaart:
Hi Søren,

reread the page and you see they mean the pin 11 and 12 of the 595.
On the Arduino side you can use any pin (but preferable not 0 and 1 as that is the serial port).

as far as I can see they adress 11 and 12 specifically on both the arduino side and 595:

"DS (pin 14) to Ardunio DigitalPin 11 (blue wire)
SH_CP (pin 11) to to Ardunio DigitalPin 12 (yellow wire)
ST_CP (pin 12) to Ardunio DigitalPin 8 (green wire)"

.. So doing bitshifting like this with a 595 doesn't have anything to do with the i2c ports on the arduino, right?
I just don't want to mix things together, and I'm pretty new to this so :slight_smile:

Yes but you can use other pins too as long as that is reflected in the code. If the hardware uses pin 4 for CLOCK the software must use digitalWrite(4,..) too.