Go Down

Topic: Mux shield 2 individual pins (Read 969 times) previous topic - next topic

aman59

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

Grumpy_Mike

Quote
mux shield 2 few days ago
The world is full of mux shields please provide a link to the one you are using.



aman59

Here is the link to mux shield

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

Grumpy_Mike

#3
Jul 31, 2015, 10:05 pm Last Edit: Jul 31, 2015, 10:06 pm by Grumpy_Mike
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:-
Code: [Select]

     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:-
Code: [Select]

     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:-
Code: [Select]

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

Go Up