Mux shield 2 individual pins

Hi,
I bought a mux shield 2 few days ago and it is not working as i wanted it to work.
My problem:
if I make all I/O as output and call any one pin from I/O 1 as HIGH and then calls any other pin from I/O 2 or I/O3 as LOW or HIGH the pin from I/O 1 gets LOW which I set as HIGH .
This case applies to I/O2 and I/O3 also if I replace I/O 1 with I/O 2 or I/O 3.
And there is no soldering problem I have checked it .
Please help me out with this problem and I am also attaching my code , please have a look to my code also

MuxShield_DigitalOut_Problem.ino (1005 Bytes)

mux shield 2 few days ago

The world is full of mux shields please provide a link to the one you are using.

Here is the link to mux shield

https://www.sparkfun.com/products/11723

It does look like you have a hardware fault. I would look again at the select line links I think there is a short between some.

The code looks fine all be it long winded. For example this bit:-

     for (int i=0; i<16; i++)
  {
    muxShield.digitalWriteMS(1,i,LOW);
  }
  for (int i=0; i<16; i++)
  {
    muxShield.digitalWriteMS(2,i,LOW);
  }
    for (int i=0; i<16; i++)
  {
    muxShield.digitalWriteMS(3,i,LOW);
  }

Could very easily be:-

     for (int i=0; i<16; i++)
  {
    muxShield.digitalWriteMS(1,i,LOW);
     muxShield.digitalWriteMS(2,i,LOW);
    muxShield.digitalWriteMS(3,i,LOW);
  }

or even shorter with:-

    for (int j = 1; j<4; j++) {
     for (int i=0; i<16; i++)
  {
    muxShield.digitalWriteMS(j,i,LOW);
  }
}