Go Down

Topic: [SOLVED] MCP4131 pots using less digital pins (Read 950 times) previous topic - next topic


Dec 23, 2012, 10:11 pm Last Edit: Dec 23, 2012, 11:27 pm by PartieHonteuse Reason: 1

I'm trying to learn about Digital pots and have ordered 3 of the MCP4131 item from SparkFun.  I'm able to get one working and blinking an LED but how can I get 2 or 3 of these working off the same Arduino Uno and blinking 2 (or 3) separate LEDs? Without using so many digital pins (3 pins per chip)?

This is very confusing to me and I've done days worth of reading and research to come up short and more confused.  Maybe I'm reading this wrong and this isn't possible to do with this specific pot.  From my research it seems other people have done what I'm wanting to do but haven't provided much input on how they wired these things together.  Actually, they probably told me exactly how to do it and I just don't understand it.  Kind of new to this whole electronics thing.

With all the reading I've been doing I haven't done a diagram of what I think is the right way to do this so I'll provide that in the next hour or so and maybe someone can easily spot my error or tell me I'm FoS.

Thanks in advance for any assistance.


Edit: fixed grammatical error in first sentence.

Nick Gammon

You are using SPI? Each chip should have MOSI/MISO/SCK wired in parallel to the hardware SPI pins (11, 12, 13 on the Uno). Then for each chip you need a separate SS (chip select) line. So you only need one extra pin per chip, not three.



Dec 23, 2012, 10:47 pm Last Edit: Dec 23, 2012, 10:50 pm by PartieHonteuse Reason: 1

I must say thank you for the extremely quick response and my apologies for not being as detailed as necessary. I work in the IT field and understand specifics help in the troubleshooting stages of a problem and will work on getting better with that.

Yes, I am using SPI and have opened the link you provided below and will definitely give that a more detailed read.

I understand that each chip should have a MOSI/MISO/SCK pin, however, this specific chip uses MOSI/MISO (SDI/SDO) on the same pin.  Does this change anything in your opinion? One post I find myself going back to on another blog site mentioned they had to put a 4.7K ohm resistor on the SDI/SDO pin to actually make it work.

Thank you again for your quick response and the information (assuming) from your site.



Edit: After reading the datasheet for the specific chip again, maybe my problem is misunderstanding MOSI/MISO vs SDI/SDO?  I don't know.  I'll take a more in-depth look at your article and will come back with any further questions, if any.


You sir, are a hero.  I got this working thanks to your excellent tutorial.

Thank you very much.


Nick Gammon


Does this change anything in your opinion?



I got this working thanks to your excellent tutorial.

Excellent. :)


I'm able to get one working and blinking an LED

Blinking an led with a digital pot. It has to be the newest market for those babies.

Go Up